ModuleDeps extends LinkedHashMap<String, ModuleDepInfo> implements Serializable { public boolean containsDep(String moduleName, BooleanTerm term) { boolean result = false; ModuleDepInfo existing = get(moduleName); if (existing != null) { result = existing.containsTerm(term); } return result; } ModuleDeps();  ModuleDeps(ModuleDeps other); boolean add(String key, ModuleDepInfo info); boolean addAll(ModuleDeps other); boolean containsDep(String moduleName, BooleanTerm term); ModuleDeps andWith(ModuleDepInfo info); boolean subtract(String key, ModuleDepInfo subInfo); boolean subtractAll(ModuleDeps toSub); Set<String> getModuleIds(); Set<String> getModuleIds(Map<?, ?> formulaCache); Map<String, String> getModuleIdsWithComments(); ModuleDeps resolveWith(Features features); ModuleDeps resolveWith(Features features, boolean coerceUndefinedToFalse); ModuleDeps simplify(Map<?, ?> formulaCache); @Override ModuleDepInfo put(String key, ModuleDepInfo value); @Override void putAll(Map<? extends String, ? extends ModuleDepInfo> map);  }
@Test public void testContainsDep() { ModuleDeps deps = new ModuleDeps(); Assert.assertTrue(deps.add("module1", new ModuleDepInfo("has", new BooleanTerm("A"), null))); Assert.assertTrue(deps.add("module2", new ModuleDepInfo("has", new BooleanTerm("B"), null))); Assert.assertTrue(deps.add("module2", new ModuleDepInfo("has", new BooleanTerm("C"), null))); Assert.assertTrue(deps.add("module3", new ModuleDepInfo(null, BooleanTerm.TRUE, null))); Assert.assertTrue(deps.add("module4", new ModuleDepInfo("has", BooleanTerm.FALSE, null))); Assert.assertTrue(deps.containsDep("module1", new BooleanTerm("A"))); Assert.assertTrue(deps.containsDep("module2", new BooleanTerm("B"))); Assert.assertTrue(deps.containsDep("module2", new BooleanTerm("C"))); Assert.assertFalse(deps.containsDep("module2", BooleanTerm.TRUE)); Assert.assertTrue(deps.containsDep("module3", BooleanTerm.TRUE)); Assert.assertTrue(deps.containsDep("module4", BooleanTerm.FALSE)); Assert.assertTrue(deps.add("module1", new ModuleDepInfo("has", new BooleanTerm("!A"), null))); Assert.assertTrue(deps.simplify(null).containsDep("module1", BooleanTerm.TRUE)); }