@Test
  void distinct() {
    check(generate(Query.of(Person.class).withDistinct(true)))
            .is("SELECT DISTINCT * FROM /myRegion");

    check(generate(Query.of(Person.class)
            .withDistinct(true)
            .addProjections(toExpression(person.fullName))))
            .is("SELECT DISTINCT fullName FROM /myRegion");

    // add limit
    check(generate(Query.of(Person.class)
            .withDistinct(true).withLimit(1)
            .addProjections(toExpression(person.fullName))))
            .is("SELECT DISTINCT fullName FROM /myRegion LIMIT 1");

    check(generate(Query.of(Person.class)
            .withDistinct(true)
            .addProjections(toExpression(person.id), toExpression(person.fullName))))
            .is("SELECT DISTINCT id, fullName FROM /myRegion");

    check(generate(Query.of(Person.class)
            .withDistinct(true).withLimit(1)
            .addProjections(toExpression(person.id), toExpression(person.fullName))))
            .is("SELECT DISTINCT id, fullName FROM /myRegion LIMIT 1");
  }
Check generated OQL out of {@link Query}
criteria/geode/test/org/immutables/criteria/geode/OqlGeneratorTest.java