@Test(expected = FileNotFoundException.class) public void getFileContentsFromResourceWithClassloaderTest() throws IOException { final String result = ReadFile.getFileContentsFromResource(TESTFILE, Thread.currentThread().getContextClassLoader()); assertNotNull(result); assertTrue(result.contains("wheezles")); ReadFile.getFileContentsFromResource(BADFILE, Thread.currentThread().getContextClassLoader()); assertFalse(true); }
public static String getFileContentsFromResource(String resourceLocation) throws IOException { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); return getFileContentsFromResource(resourceLocation, classLoader); }
ReadFile { public static String getFileContentsFromResource(String resourceLocation) throws IOException { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); return getFileContentsFromResource(resourceLocation, classLoader); } }
ReadFile { public static String getFileContentsFromResource(String resourceLocation) throws IOException { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); return getFileContentsFromResource(resourceLocation, classLoader); }  }
ReadFile { public static String getFileContentsFromResource(String resourceLocation) throws IOException { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); return getFileContentsFromResource(resourceLocation, classLoader); }  static String getFileContentsFromResource(String resourceLocation); static String getFileContentsFromResource(String resourceLocation, ClassLoader classLoader); static StringBuilder getFileContentsFromResourceAsStringBuilder(
            String resourceLocation,
            ClassLoader classLoader); static String getFileContents(File file); static StringBuilder getFileContents(InputStream inputStream); static StringBuilder getFileContents(Reader reader); }
ReadFile { public static String getFileContentsFromResource(String resourceLocation) throws IOException { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); return getFileContentsFromResource(resourceLocation, classLoader); }  static String getFileContentsFromResource(String resourceLocation); static String getFileContentsFromResource(String resourceLocation, ClassLoader classLoader); static StringBuilder getFileContentsFromResourceAsStringBuilder(
            String resourceLocation,
            ClassLoader classLoader); static String getFileContents(File file); static StringBuilder getFileContents(InputStream inputStream); static StringBuilder getFileContents(Reader reader);  }