### Question:
JmsConnectionId extends JmsAbstractResourceId implements Comparable<JmsConnectionId> { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || o.getClass() != JmsConnectionId.class) { return false; } JmsConnectionId id = (JmsConnectionId) o; return value.equals(id.value); } JmsConnectionId(String connectionId);  JmsConnectionId(JmsConnectionId id);  JmsConnectionId(JmsSessionId id);  JmsConnectionId(JmsProducerId id);  JmsConnectionId(JmsConsumerId id); String getValue(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString(); @Override int compareTo(JmsConnectionId o);  }### Answer:
@Test public void testEquals() { JmsConnectionId id1 = new JmsConnectionId(firstId); JmsConnectionId id2 = new JmsConnectionId(secondId); assertTrue(id1.equals(id1)); assertTrue(id2.equals(id2)); assertFalse(id1.equals(id2)); assertFalse(id2.equals(id1)); assertFalse(id1.equals(null)); assertFalse(id1.equals(new String("TEST"))); }