CommonExpressionMapper implements Function<ExpressionItem, Condition> { @Override public Condition apply(final ExpressionItem item) { final Condition conditions = apply(item, true); return conditions; } CommonExpressionMapper();  CommonExpressionMapper(final Function<ExpressionItem, Condition> delegateItemHandler); void addHandler(final AbstractField dataSourceField,
                           final Function<ExpressionTerm, Condition> handler); void ignoreField(final AbstractField dataSourceField); @Override Condition apply(final ExpressionItem item); Condition apply(final ExpressionItem item,
                           final boolean simplifyConditions);  }
@TestFactory List<DynamicTest> makeEmptyOpTests() { return Arrays.stream(ExpressionOperator.Op.values()) .map(opType -> { return DynamicTest.dynamicTest(opType.getDisplayValue(), () -> { final ExpressionOperator expressionOperator = new ExpressionOperator( true, opType, Collections.emptyList()); final CommonExpressionMapper mapper = new CommonExpressionMapper(); final Condition condition = mapper.apply(expressionOperator); LOGGER.info("expressionItem: {}", expressionOperator); LOGGER.info("condition: {}", condition); if (expressionOperator.op().equals(ExpressionOperator.Op.NOT)) { assertThat(condition) .isEqualTo(DSL.falseCondition()); } else { assertThat(condition) .isEqualTo(DSL.trueCondition()); } }); }) .collect(Collectors.toList()); }