### Question:
ComparatorUtils { @SuppressWarnings("unchecked") public static <E> E min(final E o1, final E o2, Comparator<E> comparator) { if (comparator == null) { comparator = NATURAL_COMPARATOR; } final int c = comparator.compare(o1, o2); return c < 0 ? o1 : o2; } 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 min() { Comparator<Integer> reversed = ComparatorUtils.reversedComparator(ComparatorUtils.<Integer>naturalComparator()); assertEquals(Integer.valueOf(1), ComparatorUtils.min(1, 10, null)); assertEquals(Integer.valueOf(-10), ComparatorUtils.min(10, -10, null)); assertEquals(Integer.valueOf(10), ComparatorUtils.min(1, 10, reversed)); assertEquals(Integer.valueOf(10), ComparatorUtils.min(10, -10, reversed)); try { ComparatorUtils.min(1, null, null); fail("expecting NullPointerException"); } catch (NullPointerException npe) { } try { ComparatorUtils.min(null, 10, null); fail("expecting NullPointerException"); } catch (NullPointerException npe) { } }