### Question:
JmsTransactionInfo extends JmsAbstractResource implements Comparable<JmsTransactionInfo> { @Override public int compareTo(JmsTransactionInfo other) { return transactionId.compareTo(other.transactionId); } JmsTransactionInfo(JmsSessionId sessionId, JmsTransactionId transactionId); JmsTransactionInfo copy(); @Override JmsTransactionId getId(); JmsSessionId getSessionId(); boolean isInDoubt(); void setInDoubt(boolean inDoubt); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(JmsTransactionInfo other); @Override String toString(); @Override void visit(JmsResourceVistor visitor);  }### Answer:
@Test public void testCompareTo() { JmsTransactionInfo first = new JmsTransactionInfo(firstSessionId, firstTxId); JmsTransactionInfo second = new JmsTransactionInfo(secondSessionId, secondTxId); assertEquals(0, first.compareTo(first)); assertFalse(second.compareTo(first) == 0); }