### Question:
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);  }### Answer:
@Test(expected = FileNotFoundException.class) public void getFileContentsFromResourceTest() throws IOException { final String result = ReadFile.getFileContentsFromResource(TESTFILE); assertNotNull(result); assertTrue(result.contains("wheezles")); ReadFile.getFileContentsFromResource(BADFILE); assertFalse(true); }
@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); }