Resource { public String getPath() { return path; } Resource(String path, Resource origin); String getPath(); Resource getOrigin(); boolean isXml(); String getContent(); SortedMap<String, String> getMap(); @Override String toString(); static String readText(Reader reader);  }
@Test public void testGetPath() throws Exception { TestResource testResource = new TestResource("path/prop", "key = value", null); assertEquals("path/prop", testResource.getPath()); TestResource testResource1 = new TestResource("path/xml", "<?xml>this is XML</xml>", null); assertEquals("path/xml", testResource1.getPath()); }