private static void assertExpressional(Criterion<?> crit, String ... expectedLines) {
    final StringBuilder out = new StringBuilder();
    Query query = Criterias.toQuery(crit);
    query.filter().ifPresent(f -> f.accept(new DebugExpressionVisitor<>(out)));
    final String expected = Arrays.stream(expectedLines).collect(Collectors.joining(System.lineSeparator()));
    Assertions.assertEquals(expected, out.toString().trim());
  }
AND / ORs combined like {@code (A and B) or (C and D)}
criteria/common/test/org/immutables/criteria/ExpressionAsStringTest.java