@Test
public void testMultiClausePush() throws IOException, RecognitionException {

    ProgramParser parser = new ProgramParser();
    OperatorNode<SequenceOperator> query = parser.parseQuery(
            "SELECT * " +
                    "FROM left " +
                    "JOIN right ON left.id = right.id " +
                    "JOIN middle ON right.id = middle.id " +
                    "WHERE left.category = 1 AND right.woeid = 2 AND middle.id = 1"
    );
    OperatorNode<SequenceOperator> transformed = new JoinFilterPushDown().visitSequenceOperator(query);
    Assert.assertEquals(transformed.getOperator(), SequenceOperator.JOIN);
    Assert.assertEquals(((OperatorNode) transformed.getArgument(0)).getOperator(), SequenceOperator.JOIN);
    Assert.assertEquals(((OperatorNode) transformed.getArgument(1)).getOperator(), SequenceOperator.FILTER);
    // TODO: validate the rest of the tree
}