### Question:
BooleanComparator implements Comparator<Boolean> { private BooleanComparator() { } private  BooleanComparator(); int compare( Boolean boolean1, Boolean boolean2 ); static final BooleanComparator INSTANCE; }### Answer:
@Test public void testBooleanComparator() { BooleanComparator comparator = BooleanComparator.INSTANCE; assertEquals( 0, comparator.compare( null, null ) ); assertEquals( 0, comparator.compare( true, true ) ); assertEquals( 0, comparator.compare( false, false ) ); assertEquals( 1, comparator.compare( false, null ) ); assertEquals( 1, comparator.compare( true, null ) ); assertEquals( 1, comparator.compare( true, false ) ); assertEquals( -1, comparator.compare( null, false ) ); assertEquals( -1, comparator.compare( null, true ) ); assertEquals( -1, comparator.compare( false, true ) ); }