public class ShortComparatorTest
{
@Test
public void testShortComparator()
{
ShortComparator comparator = new ShortComparator();
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 ) );
}