ItemLastUpdateComparator implements Comparator<Item> { @Override public int compare(Item o1, Item o2) { return o1.getLastModified().compareTo(o2.getLastModified()); }  @Override int compare(Item o1, Item o2);  }
@Test public void testCompare() { ItemLastUpdateComparator comparator = new ItemLastUpdateComparator(); int result = comparator.compare(o1, o2); assertThat(-1, is(equalTo(result))); }