private static final String plugin2 = "sample-module2";
public void testBootstrapContext() throws Exception {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
new String[]{"META-INF/impala-bootstrap.xml"});
ModificationExtractorRegistry calculatorRegistry = (ModificationExtractorRegistry) context
.getBean("modificationExtractorRegistry");
ModuleLoaderRegistry registry = (ModuleLoaderRegistry) context.getBean("moduleLoaderRegistry");
assertNotNull(registry.getModuleLoader("spring-"+ModuleTypes.ROOT));
assertNotNull(registry.getModuleLoader("spring-"+ModuleTypes.APPLICATION));
ApplicationManager applicationManager = (ApplicationManager) context.getBean("applicationManager");
Application application = applicationManager.getCurrentApplication();
RootModuleDefinition definition = new Provider().getModuleDefinition();
TransitionSet transitions = calculatorRegistry.getModificationExtractor(ModificationExtractorType.STRICT).getTransitions(application, null, definition);
TransitionManager transitionManager = (TransitionManager) context.getBean("transitionManager");
ModuleStateHolder moduleStateHolder = application.getModuleStateHolder();
transitionManager.processTransitions(moduleStateHolder, application, transitions);