ModuleDepInfo implements Serializable { public boolean containsTerm(BooleanTerm term) { if (term.isFalse() || formula.isTrue()) { return true; } if (term.isTrue()) { return false; } for (BooleanTerm termToTest : formula) { if (termToTest.isTrue()) { return true; } if (term.containsAll(termToTest)) { return true; } } return false; } ModuleDepInfo();  ModuleDepInfo(ModuleDepInfo other);  ModuleDepInfo(ModuleDepInfo other, String comment);  ModuleDepInfo(String pluginName, BooleanTerm term, String comment);  ModuleDepInfo(String pluginName, BooleanTerm term, String comment, boolean isPluginNameDeclared); Collection<String> getHasPluginPrefixes(); Collection<String> getHasPluginPrefixes(Map<?, ?> formulaCache); Boolean getIncludeStatus(); boolean containsTerm(BooleanTerm term); ModuleDepInfo andWith(ModuleDepInfo other); String getComment(); boolean add(ModuleDepInfo other); boolean subtract(ModuleDepInfo toSub); void resolveWith(Features features); void resolveWith(Features features, boolean coerceUndefinedToFalse); ModuleDepInfo simplify(Map<?, ?> formulaCache); @Override String toString(); @Override boolean equals(Object otherObj); @Override int hashCode();  }
@Test public void testContainsTerm() { ModuleDepInfo depInfo = new ModuleDepInfo(null, null, null); Assert.assertTrue(depInfo.containsTerm(BooleanTerm.FALSE)); Assert.assertTrue(depInfo.containsTerm(BooleanTerm.TRUE)); Assert.assertTrue(depInfo.containsTerm(new BooleanTerm("A"))); depInfo = new ModuleDepInfo("has", BooleanTerm.TRUE, null); Assert.assertTrue(depInfo.containsTerm(BooleanTerm.TRUE)); Assert.assertTrue(depInfo.containsTerm(BooleanTerm.FALSE)); Assert.assertTrue(depInfo.containsTerm(new BooleanTerm("A"))); depInfo = new ModuleDepInfo("has", BooleanTerm.FALSE, null); Assert.assertFalse(depInfo.containsTerm(BooleanTerm.TRUE)); Assert.assertTrue(depInfo.containsTerm(BooleanTerm.FALSE)); Assert.assertFalse(depInfo.containsTerm(new BooleanTerm("A"))); depInfo = new ModuleDepInfo("has", new BooleanTerm("A*B"), null); Assert.assertTrue(depInfo.containsTerm(BooleanTerm.FALSE)); Assert.assertFalse(depInfo.containsTerm(BooleanTerm.TRUE)); Assert.assertFalse(depInfo.containsTerm(new BooleanTerm("A"))); Assert.assertTrue(depInfo.containsTerm(new BooleanTerm("B*A"))); depInfo = new ModuleDepInfo("has", new BooleanTerm("A"), null); Assert.assertTrue(depInfo.containsTerm(new BooleanTerm("A*B"))); }