Resource { public boolean isXml() { if (content == null) { init(); } return isXml; } 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 testisXml() throws Exception { TestResource testResource = new TestResource("path/prop", "key = value", null); assertFalse(testResource.isXml()); TestResource testResource1 = new TestResource("path/xml", "<?xml>this is XML</xml>", null); assertTrue(testResource1.isXml()); }