@Test
public void visitorGetsVisited() {

    final PredicateVisitor visitorMock = mock(PredicateVisitor.class);
    final LogicalNode logicalNode = new LogicalNode(LogicalNode.Type.AND);
    logicalNode.accept(visitorMock);
    verify(visitorMock).visit(logicalNode);
}