### Question:
FileSystemManager implements Initializable { public InputStream getApplicationResourceFile(String resource) { InputStream in = null; URL resourceUrl = new FileSystemManager().getClass().getResource(resource); if (resourceUrl != null) { in = new FileSystemManager().getClass().getResourceAsStream(resource); } else { throw new OpenStorefrontRuntimeException("Unable to find internal resource file: " + resource, "This likely a programming issue or an issue with the environment."); } return in; } protected  FileSystemManager(); static FileSystemManager getInstance(); List<String> getTopLevelDirectories(Set<String> exclude); File getDir(String directory); File getConfig(String configFilename); File getImportLookup(String configFilename); File getImportLookup(String configFilename, NewFileHandler newFileHandler); InputStream getApplicationResourceFile(String resource); long copy(InputStream source, OutputStream sink); @Override void initialize(); @Override void shutdown(); @Override boolean isStarted(); String getBaseDirectory(); void setBaseDirectory(String baseDirectory); static final String MAIN_PERM_DIR; static final String MAIN_TEMP_DIR; static final String SYSTEM_TEMP_DIR; static final String CONFIG_DIR; static final String IMPORT_DIR; static final String IMPORT_HISTORY_DIR; static final String IMPORT_LOOKUP_DIR; static final String IMPORT_ARTICLE_DIR; static final String IMPORT_HIGHLIGHT_DIR; static final String IMPORT_COMPONENT_DIR; static final String ARTICLE_DIR; static final String MEDIA_DIR; static final String ATTACHMENT_DIR; static final String ARCHIVE_DIR; static final String GENERAL_MEDIA_DIR; static final String SUPPORT_MEDIA_DIR; static final String TEMPORARY_MEDIA_DIR; static final String ERROR_TICKET_DIR; static final String RESOURCE_DIR; static final String ORGANIZATION_DIR; static final String REPORT_DIR; static final String PLUGIN_DIR; static final String COMPONENT_VERSION_DIR; static final String PLUGIN_UNINSTALLED_DIR; static final String PLUGIN_FAILED_DIR; static final String DB_DIR; }### Answer:
@Test public void testGetApplicationResourceFile() { LOG.info("getApplicationResourceFile"); LOG.info("Scenario 1: Exist"); boolean foundFile = false; String resource = "/unittest-dummy.properties"; InputStream result = testFileSystemManager.getApplicationResourceFile(resource); if (result != null) { foundFile = true; } assertEquals(true, foundFile); LOG.info("Scenario 2: BAD"); try { testFileSystemManager.getApplicationResourceFile("dummy"); fail("This should throw missing expection"); } catch (OpenStorefrontRuntimeException ex) { } LOG.info("Scenario 3: NULL"); try { testFileSystemManager.getApplicationResourceFile(null); fail("This should throw a null expection"); } catch (NullPointerException ex) { } }