@Test
void compare() throws Exception {

    comparatorsAndReverses().forEachOrdered(comp -> {
        final Comparator<Entity> mock = mockComparator(
            comp.getField(),
            comp.getNullOrder(),
            comp.isReversed()
        );
        try {
            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 using %s",
                comp.getField().identifier().getColumnId(),
                comp
            ));
        } catch (final IllegalArgumentException ex) {
            throw new RuntimeException(format(
                "Error comparing %s using %s",
                comp.getField().identifier().getColumnId(),
                comp
            ), ex);
        }
    });
}