### Question:
SvgNode extends SimpleComposite<SvgNode, SvgNode> { public ObservableList<SvgNode> children() { if (myChildren == null) { myChildren = new SvgChildList(this); } return myChildren; }  SvgNodeContainer container(); ObservableList<SvgNode> children(); boolean isAttached();  }### Answer:
@Test public void nodeAdd() { SvgNode node1 = newNode(); SvgNode node2 = newNode(); assertNull(node1.parent().get()); node1.children().add(node2); assertSame(node1, node2.parent().get()); assertTrue(node1.children().size() == 1); assertSame(node1.children().get(0), node2); }
@Test public void nodeRemove() { SvgNode node1 = newNode(); SvgNode node2 = newNode(); node1.children().add(node2); node1.children().remove(node2); assertNull(node2.parent().get()); assertTrue(node1.children().isEmpty()); }