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