### Question:
FieldTable implements EncodableData { @Override public boolean equals(Object obj) { if (this == obj) { return true; } return (obj instanceof FieldTable) && properties.equals(((FieldTable) obj).properties); } FieldTable(Map<ShortString, FieldValue> properties);  FieldTable(); long getSize(); void write(ByteBuf buf); void add(ShortString propertyName, FieldValue value); @Override int hashCode(); @Override boolean equals(Object obj); static FieldTable parse(ByteBuf buf); FieldValue getValue(ShortString propertyName); static final FieldTable EMPTY_TABLE; }### Answer:
@Test public void testEquals() throws Exception { FieldValue otherType = FieldValue.parseLongString("Test"); Map<ShortString, FieldValue> properties = new HashMap<>(); properties.put(testKey, testValue); FieldTable similar = new FieldTable(properties); Assert.assertTrue(testFieldTable.equals(testFieldTable), "equals() should return true for similar objects"); Assert.assertTrue(testFieldTable.equals(similar), "equals() should return true for similar objects"); Assert.assertFalse(testFieldTable.equals(new FieldTable(Collections.emptyMap())), "equals() should return false for different objects"); Assert.assertFalse(testFieldTable.equals(otherType), "equals() should return false for different objects"); }