DirectoryBrowseResult { public void addItem(final String parentNodeId, final ContentNode contentNode, final String url) throws ContentDirectoryException { Res res = new Res(getUpnpMimeType(contentNode.getMimeType()), contentNode.getSize(), url); addDidlItem(parentNodeId, contentNode, contentNode.getName(), contentNode.getMimeType(), res); } 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(expected = ContentDirectoryException.class) public void testBadAddItemIconUrl() throws IOException, ContentDirectoryException { File file = File.createTempFile(testName.getMethodName(), "avi"); file.deleteOnExit(); MimeType mimeType = MimeType.valueOf("audio/mpeg"); ContentNode node = new ContentNode("id", "1", "name", file, mimeType); node.setIconUrl("\\bad_url"); DirectoryBrowseResult directoryBrowseResult = new DirectoryBrowseResult(0, 1); directoryBrowseResult.addItem("1", node, "http: }