DirectoryBrowseResult { public void addContainer(final String parentNodeId, final MediaNode node, final int childCount) throws ContentDirectoryException { Container container = new Container(node.getId(), parentNodeId, node.getName(), null, CONTAINER_CLASS, childCount); container.setSearchable(true); setDidlMetadata(container, node); didl.addContainer(container); itemCount++; } DirectoryBrowseResult(final long firstResult, final long maxResults); long getItemCount(); long getTotalCount(); long getFirstResult(); DIDLContent getDidl(); long getResultCount(); BrowseResult buildBrowseResult(final DIDLParser didlParser); void addItem(final String parentNodeId, final ContentNode contentNode, final String url); void addContainer(final String parentNodeId, final MediaNode node, final int childCount); boolean acceptNode();  }
@Test public void testAddContainer() throws ContentDirectoryException { FolderNode node = new FolderNode("id", "parentId", "name"); DirectoryBrowseResult directoryBrowseResult = new DirectoryBrowseResult(0, 1); directoryBrowseResult.addContainer("1", node, 1); assertEquals(directoryBrowseResult.getItemCount(), 1); assertEquals(directoryBrowseResult.getDidl().getCount(), 1); }