private static <T extends Comparable<T>> void assertOrdered(Function<Person, T> extractor, SyncFetcher<Person> reader, Ordering<T> ordering) {
    List<T> parts = reader.fetch().stream().map(extractor).collect(Collectors.toList());
    if (!ordering.isOrdered(parts)) {
      throw new AssertionError(String.format("%s is not ordered. Expected: %s", parts, ordering.sortedCopy(parts)));
    }
  }
Projection of fields which have container-like attributes: {@code Optional<T>}, {@code List<T>} etc.
criteria/common/test/org/immutables/criteria/personmodel/AbstractPersonTest.java