BooleanNode extends LeafNode<Boolean> { @Override protected boolean doSetValue(String value) { if (! value.equalsIgnoreCase("false") && ! value.equalsIgnoreCase("true")) { return false; } this.value = Boolean.valueOf(value); return true; } BooleanNode();  BooleanNode(boolean value); Boolean value(); @Override String getValue(); @Override String toString();  }
@Test public void testSetValue() { BooleanNode n = new BooleanNode(); assertTrue(n.doSetValue("true")); assertTrue(n.doSetValue("TRUE")); assertTrue(n.doSetValue("false")); assertTrue(n.doSetValue("FALSE")); assertFalse(n.doSetValue("FALSEa")); assertFalse(n.doSetValue("aFALSE")); }