@Test public void testFindXmlResource() throws IOException { URL url = pluginLoader.getResource("test1.xml"); assertNotNull("URL is null", url); InputStream in = url.openStream(); assertNotNull("input stream is null", in); byte b[] = toBytes(in); String xml = new String(b); assertTrue("xml is wrong", xml.contains("<test1>")); }
@Test public void testFindBadResource() throws IOException { URL url = pluginLoader.getResource("bogus.xml"); assertNull("URL should be null", url); }