@Test
  void notLogic() {
    repository.insert(generator.get().withId("id").withValue("value").withNullable("nullable").withOptional(Optional.of("optional")));

    // not false == true
    logicalTrue(string.value.not(v -> v.is("no")));

    // not true == false
    logicalFalse(string.value.not(v -> v.is("value")));

    // not false and not false == true
    logicalTrue(string.value.not(v -> v.is("no")).value.not(v -> v.is("no")));

    // not true and not false == false
    logicalFalse(string.value.not(v -> v.is("value")).value.not(v -> v.is("no")));

    // not true and not true == false
    logicalFalse(string.value.not(v -> v.is("value")).value.not(v -> v.is("value")));

    // not true or not true == false
    logicalFalse(string.value.not(v -> v.is("value")).or().value.not(v -> v.is("value")));

    // not true or not false == true
    logicalTrue(string.value.not(v -> v.is("value")).or().value.not(v -> v.is("no")));
  }
Test things like {@code A and (B or C)}, {@code A or B and C} {@code A or (not B and C)} etc.
Make sure boolean conditions are correctly grouped (in terms of expression priority).
criteria/common/test/org/immutables/criteria/typemodel/BooleanLogicTemplate.java