### Question:
FieldType { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FieldType fieldType = (FieldType) o; if (modifier != null ? !modifier.equals(fieldType.modifier) : fieldType.modifier != null) return false; return type != null ? type.equals(fieldType.type) : fieldType.type == null; } FieldType(String modifier, String type); String getType(); String getModifier(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testEquals() { FieldType ft1 = new FieldType("optional", "string"); FieldType ft2 = new FieldType("optional", "string"); assertEquals(ft1, ft2); }