### Question:
AmzaSipCursor implements MiruSipCursor<AmzaSipCursor> { @Override public int compareTo(AmzaSipCursor o) { int oSize = o.cursors.size(); for (int i = 0; i < cursors.size(); i++) { long id = cursors.get(i).id; long oId = (i < oSize) ? o.cursors.get(i).id : Long.MIN_VALUE; int c = Long.compare(id, oId); if (c != 0) { return c; } } int c = Integer.compare(cursors.size(), oSize); if (c != 0) { return c; } return Boolean.compare(endOfStream, o.endOfStream); } @JsonCreator  AmzaSipCursor(@JsonProperty("cursors") Collection<NamedCursor> cursors,
        @JsonProperty("endOfStream") boolean endOfStream); @Override boolean endOfStream(); @Override int compareTo(AmzaSipCursor o); @Override String toString(); final List<NamedCursor> cursors; final boolean endOfStream; }### Answer:
@Test public void testComparable() { AmzaSipCursor cursor1 = new AmzaSipCursor( Arrays.asList( new NamedCursor("00001_4846848290113083095", 374353459262005248L), new NamedCursor("00002_5460278797972548316", 374353307965079552L), new NamedCursor("00003_5915928173792988065", 374353307960893440L)), false); AmzaSipCursor cursor2 = new AmzaSipCursor( Arrays.asList( new NamedCursor("00002_5460278797972548316", 374353307965079552L), new NamedCursor("00003_5915928173792988065", 374353307960893440L), new NamedCursor("00001_4846848290113083095", 374353307851825152L)), false); assertTrue(cursor1.compareTo(cursor2) > 0); assertTrue(cursor2.compareTo(cursor1) < 0); assertTrue(cursor1.compareTo(cursor1) == 0); assertTrue(cursor2.compareTo(cursor2) == 0); }