@Test
public void letsParse() throws ParserException {

    SingleComparisonNode comparison;
    final RootNode root = parser.parse("and(eq(username,123),eq(coolness,\"super\"),or(eq(username,854)))");
    assertThat(root).isNotNull();
    assertThat(root.getChildren().size()).isEqualTo(1);
    final LogicalNode and = (LogicalNode) root.getChildren().get(0);
    assertThat(and.getName()).isEqualTo("and");
    assertThat(and.getChildren().size()).isEqualTo(3);
    comparison = (SingleComparisonNode) and.getChildren().get(0);
    assertThat(comparison.getComparisonType()).isEqualTo(SingleComparisonNode.Type.EQ);
    assertThat(comparison.getComparisonProperty()).isEqualTo("username");
    assertThat(comparison.getComparisonValue().getClass()).isEqualTo(Long.class);
    assertThat(comparison.getComparisonValue()).isEqualTo(123L);
    comparison = (SingleComparisonNode) and.getChildren().get(1);
    assertThat(comparison.getComparisonType()).isEqualTo(SingleComparisonNode.Type.EQ);
    assertThat(comparison.getComparisonProperty()).isEqualTo("coolness");
    assertThat(comparison.getComparisonValue().getClass()).isEqualTo(String.class);
    assertThat(comparison.getComparisonValue()).isEqualTo("super");
    final LogicalNode or = (LogicalNode) and.getChildren().get(2);
    assertThat(or.getName()).isEqualTo("or");
    assertThat(or.getChildren().size()).isEqualTo(1);
    comparison = (SingleComparisonNode) or.getChildren().get(0);
    assertThat(comparison.getComparisonType()).isEqualTo(SingleComparisonNode.Type.EQ);
    assertThat(comparison.getComparisonProperty()).isEqualTo("username");
    assertThat(comparison.getComparisonValue().getClass()).isEqualTo(Long.class);
    assertThat(comparison.getComparisonValue()).isEqualTo(854L);
}