### Question:
ComparableComparator implements Comparator<C>, Serializable { public static <C> Comparator<C> get() { return INSTANCE; } private  ComparableComparator(); @Override int compare(C o1, C o2); static Comparator<C> get();  }### Answer:
@Test public void max() { final Comparator<Integer> comparator = ComparableComparator.get(); final List<Integer> collection = asList(1, 5, 3, 7, 3, 1, 3, 12, 5, 2); assertEquals(12, (int) Collections.max(collection, comparator)); }
@Test public void min() { final Comparator<Integer> comparator = ComparableComparator.get(); final List<Integer> collection = asList(1, 5, 3, 7, 3, 1, 3, 12, 5, 2); assertEquals(1, (int) Collections.min(collection, comparator)); }