### Question:
SequenceDesc { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final SequenceDesc other = (SequenceDesc) obj; return key.equals(other.key); }  String getSequenceName(); void setSequenceName(String sequenceName); long getInitialValue(); void setInitialValue(long initialValue); int getAllocationSize(); void setAllocationSize(int allocationSize); String getDataType(); void setDataType(String dataType); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testEquals() throws Exception { SequenceDesc sequenceDesc = new SequenceDesc(); sequenceDesc.setSequenceName("AAA"); SequenceDesc sequenceDesc2 = new SequenceDesc(); sequenceDesc2.setSequenceName("aaa"); SequenceDesc sequenceDesc3 = new SequenceDesc(); sequenceDesc3.setSequenceName("XXX"); assertEquals(sequenceDesc, sequenceDesc2); assertEquals(sequenceDesc.hashCode(), sequenceDesc2.hashCode()); Assert.assertNotEquals(sequenceDesc, sequenceDesc3); Assert.assertNotEquals(sequenceDesc.hashCode(), sequenceDesc3 .hashCode()); }