ExpressionVisitorImpl implements ExpressionVisitor<Object> { @Override public Filter visitUnaryExpressionOperation( UnaryExpression.Operation operation, Object operand) { if (Objects.equals(UnaryExpression.Operation.NOT, operation)) { return _getNotFilter((Filter)operand); } throw new UnsupportedOperationException( "Unsupported method visitUnaryExpressionOperation with operation " + operation); } ExpressionVisitorImpl(
		Format format, Locale locale, EntityModel entityModel); @Override Filter visitBinaryExpressionOperation(
		BinaryExpression.Operation operation, Object left, Object right); @Override Object visitCollectionPropertyExpression(
			CollectionPropertyExpression collectionPropertyExpression); @Override Object visitComplexPropertyExpression(
		ComplexPropertyExpression complexPropertyExpression); @Override Object visitLambdaFunctionExpression(
			LambdaFunctionExpression.Type type, String variable,
			Expression expression); @Override EntityField visitLambdaVariableExpression(
			LambdaVariableExpression lambdaVariableExpression); @Override Object visitListExpressionOperation(
			ListExpression.Operation operation, Object left, List<Object> right); @Override Object visitLiteralExpression(LiteralExpression literalExpression); @Override Object visitMemberExpression(MemberExpression memberExpression); @Override Object visitMethodExpression(
		List<Object> expressions, MethodExpression.Type type); @Override Object visitPrimitivePropertyExpression(
		PrimitivePropertyExpression primitivePropertyExpression); @Override Filter visitUnaryExpressionOperation(
		UnaryExpression.Operation operation, Object operand);  }
@Test public void testVisitUnaryExpressionOperation() { TermFilter termFilter = new TermFilter("title", "title1"); BooleanFilter booleanFilter = (BooleanFilter)_expressionVisitorImpl.visitUnaryExpressionOperation( UnaryExpression.Operation.NOT, termFilter); Assert.assertTrue(booleanFilter.hasClauses()); List<BooleanClause<Filter>> booleanClauses = booleanFilter.getMustNotBooleanClauses(); Assert.assertEquals( booleanClauses.toString(), 1, booleanClauses.size()); BooleanClause<Filter> queryBooleanClause = booleanClauses.get(0); Assert.assertEquals(termFilter, queryBooleanClause.getClause()); Assert.assertEquals( BooleanClauseOccur.MUST_NOT, queryBooleanClause.getBooleanClauseOccur()); }