@Test public void toStringWorks() { String toString = new DomainObject(DomainObjectAssertion.class).toString(); assertThat(toString, containsString("packageName")); assertThat(toString, containsString("className")); }
@Override public String toString() { return ReflectionToStringBuilder.toString(this); }
DomainObject { @Override public String toString() { return ReflectionToStringBuilder.toString(this); } }
DomainObject { @Override public String toString() { return ReflectionToStringBuilder.toString(this); } DomainObject(String packageName, String className, String description);  DomainObject(Class<?> clazz, String description);  DomainObject(Class<?> clazz); }
DomainObject { @Override public String toString() { return ReflectionToStringBuilder.toString(this); } DomainObject(String packageName, String className, String description);  DomainObject(Class<?> clazz, String description);  DomainObject(Class<?> clazz); String getPackageName(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
DomainObject { @Override public String toString() { return ReflectionToStringBuilder.toString(this); } DomainObject(String packageName, String className, String description);  DomainObject(Class<?> clazz, String description);  DomainObject(Class<?> clazz); String getPackageName(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); final String packageName; final String className; final String description; }