@Test(timeout = 8000)
public void findMinMax() throws Throwable {

    Stream stream = Arrays.stream(new Integer[]{10, 20, 1, 5, 8, 94, 1, -52, 0});
    Comparator<Integer> comparator = Integer::compare;
    final boolean[] failFlag = {true};
    BiConsumer<Integer, Integer> biConsumer = (min, max) -> {
        assertEquals(new Integer(-52), min);
        assertEquals(new Integer(94), max);
        failFlag[0] = false;
    };
    TestUtils.invokeMethod(mainClass, findMinMax, stream, comparator, biConsumer);
    if (failFlag[0]) {
        fail("biConsumer didn't accept");
    }
}