### Question:
ComparatorUtils { public static Comparator<Boolean> booleanComparator(final boolean trueFirst) { return BooleanComparator.booleanComparator(trueFirst); } private  ComparatorUtils(); @SuppressWarnings("unchecked") static Comparator<E> naturalComparator(); static Comparator<E> chainedComparator(final Comparator<E>... comparators); @SuppressWarnings("unchecked") static Comparator<E> chainedComparator(final Collection<Comparator<E>> comparators); static Comparator<E> reversedComparator(final Comparator<E> comparator); static Comparator<Boolean> booleanComparator(final boolean trueFirst); @SuppressWarnings("unchecked") static Comparator<E> nullLowComparator(Comparator<E> comparator); @SuppressWarnings("unchecked") static Comparator<E> nullHighComparator(Comparator<E> comparator); @SuppressWarnings("unchecked") static Comparator<I> transformedComparator(Comparator<O> comparator,
            final Transformer<? super I, ? extends O> transformer); @SuppressWarnings("unchecked") static E min(final E o1, final E o2, Comparator<E> comparator); @SuppressWarnings("unchecked") static E max(final E o1, final E o2, Comparator<E> comparator); @SuppressWarnings({ "rawtypes", "unchecked" }) // explicit type needed for Java 1.5 compilation
    static final Comparator NATURAL_COMPARATOR; }### Answer:
@Test public void booleanComparator() { Comparator<Boolean> comp = ComparatorUtils.booleanComparator(true); assertTrue(comp.compare(Boolean.TRUE, Boolean.FALSE) < 0); assertTrue(comp.compare(Boolean.TRUE, Boolean.TRUE) == 0); assertTrue(comp.compare(Boolean.FALSE, Boolean.TRUE) > 0); comp = ComparatorUtils.booleanComparator(false); assertTrue(comp.compare(Boolean.TRUE, Boolean.FALSE) > 0); assertTrue(comp.compare(Boolean.TRUE, Boolean.TRUE) == 0); assertTrue(comp.compare(Boolean.FALSE, Boolean.TRUE) < 0); }