### Question:
MyBean { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; MyBean other = (MyBean) obj; if (field1 == null) { if (other.field1 != null) return false; } else if (!field1.equals(other.field1)) return false; return true; } MyBean();  MyBean(String def); String getField1(); void setField1(String field1); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }### Answer:
@Test public void testEquals() { assertThat(MyBean.class).is( allOf(hasValidBeanConstructor(), hasValidGettersAndSetters(), hasValidBeanHashCode(), hasValidBeanEquals(), hasValidBeanToString())); }