SkelNode { void addChild(SkelNode child) { this.children.add(child); } SkelNode(Long associatedBodyId, List<Integer> location, Double radius, int type, SkelNode parent, int rowNumber);  SkelNode(Long associatedBodyId, List<Integer> location, Double radius, int rowNumber);  SkelNode(); static String getSkelNodeListJson(List<SkelNode> skelNodeList); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); List<SkelNode> getChildren(); SkelNode getParent(); List<Integer> getLocation(); Integer getX(); Integer getY(); Integer getZ(); int getRowNumber(); String getLocationString(); Point getLocationAsPoint(); String getSkelNodeId(String dataset); Double getRadius(); int getType(); Long getAssociatedBodyId();  }
@Test public void testAddChild() { List<Integer> location1 = new ArrayList<>(); location1.add(0); location1.add(1); location1.add(5); SkelNode skelNode1 = new SkelNode(10L, location1, 3.0D, 2, new SkelNode(), 1); List<Integer> location2 = new ArrayList<>(); location2.add(0); location2.add(1); location2.add(5); SkelNode skelNode2 = new SkelNode(13L, location2, 34.0D, 1, new SkelNode(), 2); SkelNode skelNode3 = new SkelNode(13L, location2, 34.0D, 1, new SkelNode(), 3); skelNode1.addChild(skelNode2); skelNode1.addChild(skelNode3); List<SkelNode> childList = new ArrayList<>(); childList.add(skelNode2); childList.add(skelNode3); Assert.assertEquals(childList, skelNode1.getChildren()); Assert.assertEquals(2, skelNode1.getChildren().size()); Assert.assertEquals(0, skelNode2.getChildren().size()); }