@Test
public void testResourceToStringForResourceEndOfLineStringXmlEncode() throws Exception {

    URL resource = TestFileUtils.getTestFileURL("/Misc/test_file_for_resource_to_string_misc.txt");
    String s1 = Misc.resourceToString(resource, " newly added string ", true);
    assertEquals("&lt;!doctype txt&gt;this is a text file. newly added string new line in the text file.", s1);
}