ResourceUtil { public static String readResourceFileToString(final String path) throws IOException { return SetUtil.implode(readResourceFileToStringList(path), "\n"); } private  ResourceUtil(); static String readResourceFileToString(final String path); static List<String> readResourceFileToStringList(final String path); static List<String> readResourceFileToStringList(final ResourceFile resourceFile); static ResourceFile getResourceAsFile(final String path); static URL getResourceAsURL(final String path); static String getResourceAsTempFile(final String resourcePath);  }
@Test public void testReadResourceToString() throws IOException { String actualContent = ResourceUtil.readResourceFileToString(RESOURCE_FILE_PATH).trim(); assertEquals("The content of the read-in resource does not match the expected content", EXPECTED_CONTENT, actualContent); }