@Test
void testNegate() {

    CombinedPredicate<Integer> p = CombinedPredicate.and(MOD2, MOD4);
    p = p.and(MOD8);
    p = p.negate();
    for (int i = 0; i < 100; i++) {
        boolean expected = !(MOD2.test(i) && MOD4.test(i) && MOD8.test(i));
        boolean actual = p.test(i);
        assertEquals(expected, actual);
    }
}