### Question:
FileSystemManager implements Initializable { public File getConfig(String configFilename) { Objects.requireNonNull(configFilename); return getFileDir(configFilename, CONFIG_DIR, "/"); } 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 testGetConfig() { LOG.info("getConfig"); LOG.info("Scenario 1: Get the dummy config"); String configFilename = "unittest-dummy.properties"; File expResult = new File(testFileSystemManager.getBaseDirectory() + FileSystemManager.CONFIG_DIR.replace("/", File.separator) + "/" + configFilename); File result = testFileSystemManager.getConfig(configFilename); assertEquals(expResult, result); if (!result.exists()) { fail("The file should exist"); } LOG.info("Scenario 2: Try to get one that doesn't exist"); try { testFileSystemManager.getConfig(configFilename + "bad"); fail("This should throw an error"); } catch (OpenStorefrontRuntimeException ex) { } LOG.info("Scenario 3: NULL"); try { testFileSystemManager.getDir(null); fail("This should throw expection"); } catch (NullPointerException ex) { } }