DependencyList { public void setCoerceUndefinedToFalse(boolean state) { final boolean entryExitLogging = log.isLoggable(Level.FINER); final String methodName = "setCoerceUndefinedToFalse"; if (entryExitLogging) { log.entering(DependencyList.class.getName(), methodName, new Object[]{state}); } this.coerceUndefinedToFalse = state; if (entryExitLogging) { log.exiting(DependencyList.class.getName(), methodName); } } DependencyList(String source, Iterable<String> names, IAggregator aggr, Features features,  boolean resolveAliases, boolean includeDetails); @SuppressWarnings("unchecked")  DependencyList(String source, Iterable<String> names, IAggregator aggr, Features features,  boolean resolveAliases, boolean includeDetails, boolean includeRequireDeps);  DependencyList(ModuleDeps explicitDeps, ModuleDeps expandedDeps, Set<String> dependentFeatures); ModuleDeps getExplicitDeps(); ModuleDeps getExpandedDeps(); Set<String> getDependentFeatures(); void setLabel(String label); void setCoerceUndefinedToFalse(boolean state); String getLabel();  }
@Test public void testSetCoerceUndefinedToFalse() throws Exception { Set<String> names = new HashSet<String>(Arrays.asList(new String[]{"has!test?:foo/test"})); moduleDeps.put("foo/test", new String[]{"has!zzz?foo/dep1", "has!yyy?:foo/dep2"}); DependencyList depList = new DependencyList("test", names, mockAggregator, features, true, false); depList.setCoerceUndefinedToFalse(true); assertEquals(new HashSet<String>(Arrays.asList(new String[]{"has", "foo/test"})),depList.getExplicitDeps().getModuleIds()); assertEquals(new HashSet<String>(Arrays.asList(new String[]{"has", "foo/dep2"})),depList.getExpandedDeps().getModuleIds()); }