assertTrue(modulesToLoad.contains("sample-module2"));
}
public void testLoadFiveAndSix() {
setExistingDefinition("impala-core");
IncrementalModuleDefinitionSource moduleDefinitionSource = new IncrementalModuleDefinitionSource(resolver, typeReaderRegistry, rootModuleDefinition, "sample-module6");
RootModuleDefinition root = moduleDefinitionSource.getModuleDefinition();
assertTrue(root.hasSibling("sample-module5"));
ModuleDefinition definition5 = root.findChildDefinition("sample-module5", true);
assertNotNull(definition5);
assertFalse(root.hasSibling("sample-module6"));
ModuleDefinition definition6 = root.findChildDefinition("sample-module6", true);
assertNotNull(definition6);
assertNotNull(definition5.findChildDefinition("sample-module6", true));
List<String> asList = definition6.getDependentModuleNames(false);
assertEquals(Arrays.asList("sample-module5", "sample-module4"), asList);
List<String> modulesToLoad = moduleDefinitionSource.getModulesToLoad();
assertEquals(2, modulesToLoad.size());
assertTrue(modulesToLoad.contains("sample-module5"));
assertTrue(modulesToLoad.contains("sample-module6"));
}