### Question:
JmsConnectionId extends JmsAbstractResourceId implements Comparable<JmsConnectionId> { @Override public int hashCode() { if (hashCode == 0) { hashCode = 1; hashCode = 31 * hashCode + value.hashCode(); } return hashCode; } 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 testHashCode() { JmsConnectionId id1 = new JmsConnectionId(firstId); JmsConnectionId id2 = new JmsConnectionId(secondId); assertEquals(id1.hashCode(), id1.hashCode()); assertEquals(id2.hashCode(), id2.hashCode()); assertFalse(id1.hashCode() == id2.hashCode()); }