### Question:
IO { @Nullable public static InputStream getFileResource(String resourcePath) { Class<IO> cl = IO.class; InputStream is = cl.getResourceAsStream(resourcePath); if (is != null) { return is; } try { is = new FileInputStream(resourcePath); } catch (FileNotFoundException | AccessControlException e) { } return is; }  @Nullable static InputStream getFileResource(String resourcePath); static long copy(InputStream in, OutputStream out); static long copyBuffered(InputStream in, OutputStream out, int buffer_size); static long copy2null(InputStream in, int buffersize); static long copy2null(FileChannel in, int buffersize); static long copyB(InputStream in, OutputStream out, int bufferSize); static void copyMaxBytes(InputStream in, OutputStream out, int maxBytes); static String readContents(InputStream is); static String readContents(InputStream is, String charset); static byte[] readContentsToByteArray(InputStream is); static void writeContents(String contents, OutputStream os); static void copyFile(String fileInName, String fileOutName); static void copyFile(File fileIn, File fileOut); static void copy2File(byte[] src, String fileOut); static void copyFile(String fileInName, OutputStream out); static void copyFileB(File fileIn, OutputStream out, int bufferSize); static long copyRafB(ucar.unidata.io.RandomAccessFile raf, long offset, long length, OutputStream out,
      byte[] buffer); static void copyDirTree(String fromDirName, String toDirName); static byte[] readFileToByteArray(String filename); static String readFile(String filename); static void writeToFile(String contents, File file); static void writeToFile(byte[] contents, File file); static void writeToFile(String contents, String fileOutName); static long writeToFile(InputStream in, String fileOutName); static long appendToFile(InputStream in, String fileOutName); static final int default_file_buffersize; static final int default_socket_buffersize; }### Answer:
@Test public void testGetFileResource() throws IOException { String filename = TestNcmlRead.topDir + "aggExisting.xml"; try (InputStream is = IO.getFileResource(filename)) { assertThat(is).isNotNull(); } }