ComparisonOp extends AbstractNode { public String getOperator(){ return value; } ComparisonOp(InputStream is); @Override String toString(); String getOperator();  }
@Test public void test() throws Exception { String[] tests = new String[]{"<",">","=","!=","IN","BETWEEN","STARTS_WITH"}; for(String test : tests){ ComparisonOp name = new ComparisonOp(getInputStream(test)); String nameVal = name.getOperator(); assertNotNull(nameVal); assertEquals(test, nameVal); } }
@Test(expected=ParserException.class) public void testInvalidOp() throws Exception { String test = "AND"; ComparisonOp name = new ComparisonOp(getInputStream(test)); String nameVal = name.getOperator(); assertNotNull(nameVal); assertEquals(test, nameVal); }