TableOfContents implements Serializable { public int calculateDepth() { return calculateDepth(tocReferences, 0); } TableOfContents();  TableOfContents(List<TOCReference> tocReferences); List<TOCReference> getTocReferences(); void setTocReferences(List<TOCReference> tocReferences); TOCReference addSection(Resource resource, String path); TOCReference addSection(Resource resource, String path, String pathSeparator); TOCReference addSection(Resource resource, String[] pathElements); TOCReference addSection(Resource resource, int[] pathElements, String sectionTitlePrefix, String sectionNumberSeparator); TOCReference addTOCReference(TOCReference tocReference); List<Resource> getAllUniqueResources(); int size(); int calculateDepth(); static final String DEFAULT_PATH_SEPARATOR; }
@Test public void testCalculateDepth_simple1() { TableOfContents tableOfContents = new TableOfContents(); assertEquals(0, tableOfContents.calculateDepth()); }