@Test
  void localDate() {
    final LocalDateHolderCriteria criteria = LocalDateHolderCriteria.localDateHolder;
    check(Matchers.toExpression(criteria.value.min()).returnType()).is(LocalDate.class);
    check(Matchers.toExpression(criteria.value.max()).returnType()).is(LocalDate.class);
    check(Matchers.toExpression(criteria.value.count()).returnType()).is(Long.class);
    check(Matchers.toExpression(criteria.value).returnType()).is(LocalDate.class);
    check(Matchers.toExpression(criteria.optional).returnType()).is(new TypeToken<Optional<LocalDate>>() {}.getType());
    check(Matchers.toExpression(criteria.nullable).returnType()).is(LocalDate.class);
  }
Check return and projection types for different types of matchers
criteria/common/test/org/immutables/criteria/matcher/ReturnTypeTest.java