### Question:
JmsSessionId extends JmsAbstractResourceId implements Comparable<JmsSessionId> { @Override public int hashCode() { if (hashCode == 0) { hashCode = 1; hashCode = 31 * hashCode + connectionId.hashCode(); hashCode = 31 * hashCode + (int) (value ^ (value >>> 32)); } return hashCode; } JmsSessionId(String connectionId, long value);  JmsSessionId(JmsConnectionId connectionId, long sessionId);  JmsSessionId(JmsSessionId id);  JmsSessionId(JmsProducerId id);  JmsSessionId(JmsConsumerId id); JmsConnectionId getParentId(); @Override int hashCode(); @Override boolean equals(Object o); String getConnectionId(); long getValue(); @Override String toString(); @Override int compareTo(JmsSessionId other);  }### Answer:
@Test public void testHashCode() { JmsSessionId id1 = new JmsSessionId(firstId, 1); JmsSessionId id2 = new JmsSessionId(secondId, 2); assertEquals(id1.hashCode(), id1.hashCode()); assertEquals(id2.hashCode(), id2.hashCode()); assertFalse(id1.hashCode() == id2.hashCode()); }