### Question:
ShortComparator implements Comparator<Short> { private ShortComparator() { } private  ShortComparator(); int compare( Short short1, Short short2 ); static final ShortComparator INSTANCE; }### Answer:
@Test public void testShortComparator() { ShortComparator comparator = ShortComparator.INSTANCE; assertEquals( 0, comparator.compare( null, null ) ); assertEquals( 0, comparator.compare( ( short ) 1, ( short ) 1 ) ); assertEquals( 0, comparator.compare( ( short ) -1, ( short ) -1 ) ); assertEquals( 1, comparator.compare( ( short ) 1, null ) ); assertEquals( 1, comparator.compare( ( short ) 2, ( short ) 1 ) ); assertEquals( 1, comparator.compare( ( short ) 3, ( short ) 1 ) ); assertEquals( 1, comparator.compare( ( short ) 1, ( short ) -1 ) ); assertEquals( -1, comparator.compare( null, ( short ) 1 ) ); assertEquals( -1, comparator.compare( ( short ) 1, ( short ) 2 ) ); assertEquals( -1, comparator.compare( ( short ) -1, ( short ) 1 ) ); }