@Test
  void countWithLimit() {
    check(generate(Query.of(Person.class).withCount(true).withLimit(1)))
            .is("SELECT COUNT(*) FROM (SELECT * FROM /myRegion LIMIT 1)");

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