BooleanOp extends AbstractNode { public String getOperator(){ return value; } BooleanOp(InputStream is); @Override String toString(); String getOperator(); boolean isAnd(); boolean isOr();  }
@Test public void test() throws Exception { String[] tests = new String[]{"AND", "OR"}; for(String test : tests){ BooleanOp name = new BooleanOp(getInputStream(test)); String nameVal = name.getOperator(); assertNotNull(nameVal); assertEquals(test, nameVal); } }
@Test(expected=ParserException.class) public void testInvalid() throws Exception { String test = "<"; BooleanOp name = new BooleanOp(getInputStream(test)); String nameVal = name.getOperator(); assertNotNull(nameVal); assertEquals(test, nameVal); }