@Test
void thenComparing() throws Exception {

    comparatorsAndReverses().forEachOrdered(comp1 -> {
        final Comparator<Entity> mock1 = mockComparator(
            comp1.getField(),
            comp1.getNullOrder(),
            comp1.isReversed()
        );
        comparatorsAndReverses().forEachOrdered(comp2 -> {
            final Comparator<Entity> mock2 = mockComparator(
                comp2.getField(),
                comp2.getNullOrder(),
                comp2.isReversed()
            );
            final Comparator<Entity> mock = mock1.thenComparing(mock2);
            final Comparator<Entity> comp = comp1.thenComparing(comp2);
            final List<Entity> expected = list.stream().sorted(mock).collect(toList());
            final List<Entity> actual   = list.stream().sorted(comp).collect(toList());
            assertEquals(actual, expected, format("Compare %s then %s (reversed) using %s",
                comp1.getField().identifier().getColumnId(),
                comp2.getField().identifier().getColumnId(),
                comp
            )
            );
        });
    });
}