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