public class StringComparatorTest
{
@Test
public void testStringComparator()
{
StringComparator comparator = new StringComparator();
assertEquals( 0, comparator.compare( null, null ) );
assertEquals( 0, comparator.compare( "", "" ) );
assertEquals( 0, comparator.compare( "abc", "abc" ) );
assertEquals( 1, comparator.compare( "", null ) );
assertEquals( 1, comparator.compare( "abc", "" ) );
assertEquals( 1, comparator.compare( "ac", "ab" ) );
assertEquals( 1, comparator.compare( "abc", "ab" ) );
assertEquals( -1, comparator.compare( null, "" ) );
assertEquals( -1, comparator.compare( "ab", "abc" ) );
assertEquals( -1, comparator.compare( "ab", "abc" ) );
}