@Test
  public void basic() {
    assumeFeature(Feature.QUERY);

    final Person john = new PersonGenerator().next()
            .withFullName("John")
            .withIsActive(true)
            .withAge(22);

    insert(john);

    check(person.fullName.is("John")).hasSize(1);
    check(person.fullName.isNot("John")).empty();
    check(person.fullName.is("John")
            .age.isNot(1)).hasSize(1);
    check(person.fullName.is("John")
            .age.is(22)).hasSize(1);
    check(person.fullName.is("_MISSING_")).empty();
    check(person.fullName.in(Collections.emptyList())).empty();
    check(person.fullName.in(Collections.singleton("John"))).hasSize(1);
    check(person.fullName.in("John", "test2")).hasSize(1);
    check(person.fullName.notIn(Collections.singleton("John"))).empty();
    check(person.fullName.notIn("John", "test2")).empty();

    // true / false
    check(person.isActive.isTrue()).hasSize(1);
    check(person.isActive.isFalse()).empty();

    // isPresent / isAbsent
    check(person.address.isAbsent()).empty();
    check(person.address.isPresent()).notEmpty();

    // simple OR
    check(person.address.isAbsent().or().address.isPresent()).notEmpty();
    check(person.isActive.isFalse().or().isActive.isTrue()).notEmpty();
  }
some variations of boolean logic with {@code NOT} operator
criteria/common/test/org/immutables/criteria/personmodel/AbstractPersonTest.java