### Question:
JmsProducerInfo extends JmsAbstractResource implements Comparable<JmsProducerInfo> { @Override public int compareTo(JmsProducerInfo other) { return producerId.compareTo(other.producerId); } JmsProducerInfo(JmsProducerId producerId);  JmsProducerInfo(JmsProducerId producerId, JmsMessageIDBuilder messageIDBuilder); JmsProducerInfo copy(); void copy(JmsProducerInfo info); @Override JmsProducerId getId(); JmsSessionId getParentId(); JmsDestination getDestination(); void setDestination(JmsDestination destination); boolean isPresettle(); void setPresettle(boolean presettle); JmsMessageIDBuilder getMessageIDBuilder(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(JmsProducerInfo other); @Override void visit(JmsResourceVistor vistor);  }### Answer:
@Test public void testCompareTo() { JmsProducerInfo first = createPorducerInfo(firstId); JmsProducerInfo second = createPorducerInfo(secondId); assertEquals(-1, first.compareTo(second)); assertEquals(0, first.compareTo(first)); assertEquals(1, second.compareTo(first)); }