Resource { public String getContent() { if (content == null) { init(); } return content; } 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 testGetContent() throws Exception { assertEquals("key = value", new TestResource("", "key = value", null).getContent()); assertEquals("<?xml>this is XML</xml>", new TestResource("", "<?xml>this is XML</xml>", null).getContent()); }