ResourceResolver implements URIResolver { @Override public Source resolve(String href, String base) throws TransformerException { if (null == href || href.length() == 0) { return null; } try { String resource = href; ResourceLoader loader = new ResourceLoader(); return new StreamSource(loader.getResourceStream(resource), resource); } catch (Exception ex) { throw new TransformerException(ex); } }  @Override Source resolve(String href, String base);  }
@Test public void testResolve() throws Exception { System.out.println("resolve"); String href = ""; String base = ""; ResourceResolver instance = new ResourceResolver(); Source expResult = null; Source result = instance.resolve(href, base); Assert.assertEquals(expResult, result); }