### Question:
LongComparator implements Comparator<Long> { private LongComparator() { } private  LongComparator(); int compare( Long long1, Long long2 ); static final LongComparator INSTANCE; }### Answer:
@Test public void testLongComparator() { LongComparator comparator = LongComparator.INSTANCE; assertEquals( 0, comparator.compare( null, null ) ); assertEquals( 0, comparator.compare( 1L, 1L ) ); assertEquals( 0, comparator.compare( -1L, -1L ) ); assertEquals( 1, comparator.compare( 1L, null ) ); assertEquals( 1, comparator.compare( 2L, 1L ) ); assertEquals( 1, comparator.compare( 3L, 1L ) ); assertEquals( 1, comparator.compare( 1L, -1L ) ); assertEquals( -1, comparator.compare( null, 1L ) ); assertEquals( -1, comparator.compare( 1L, 2L ) ); assertEquals( -1, comparator.compare( -1L, 1L ) ); }