PolyTree extends PolyNode { public int getTotalSize() { int result = allPolys.size(); if (result > 0 && childs.get( 0 ) != allPolys.get( 0 )) { result--; } return result; }  void Clear(); List<PolyNode> getAllPolys(); PolyNode getFirst(); int getTotalSize();  }
@Test public void getTotalSizePolyTreeEmptyTest() { PolyTree tree = new PolyTree(); Assert.assertEquals(0, tree.getTotalSize()); }