ExportManager { public String getValue(String key) { if (key.indexOf(DOLLAR) == -1) { String value = getVariable(key); if (value == null) return null; if (value.indexOf(DOLLAR) == -1) return value; else return parseValue(value); } return parseValue(key); } ExportManager(File exportFile);  ExportManager(File exportFile, ExportChangeListener listener);  ExportManager(File exportFile, boolean exportUsesSystemEnvironment);  ExportManager(File exportFile, boolean exportUsesSystemEnvironment, ExportChangeListener listener); Set<String> keys(); String addVariable(String line); String getValue(String key); String getValueIgnoreCase(String name); String listAllVariables(); void persistVariables(); List<String> getAllNamesWithEquals(); List<String> getAllNames(); List<String> findAllMatchingKeys(String word);  }
@Test public void testVariableNotExist() { ExportManager exportManager = new ExportManager(new File(Config.getTmpDir()+Config.getPathSeparator()+"aesh_variable_test")); assertEquals("", exportManager.getValue("$FOO3")); assertEquals(null, exportManager.getValue("FOO3")); }
@Test public void testLoadSystemEnv() throws IOException { ExportManager exportManager = new ExportManager(new File(Config.getTmpDir()+Config.getPathSeparator()+"aesh_variable_test"), true); String result = exportManager.getValue("PATH"); if (Config.isOSPOSIXCompatible()) { assertTrue(result.contains("/usr")); } }