catch (NoServiceException e) {
}
// now reload the module, and see that behaviour returns
addModule(new SimpleModuleDefinition(plugin2));
bean2 = (FileMonitor) parent.getBean("bean2");
assertEquals(100L, bean2.lastModified((File) null));
addModule(new SimpleModuleDefinition(plugin1));
bean1 = (FileMonitor) parent.getBean("bean1");
assertEquals(999L, bean1.lastModified((File) null));
FileMonitor bean3 = (FileMonitor) parent.getBean("bean3");
try {
bean3.lastModified((File) null);
fail();
}
catch (NoServiceException e) {
}
ModuleDefinition p2 = root.getChildModuleDefinition(plugin2);
addModule(new SimpleModuleDefinition(p2, plugin3));
assertEquals(333L, bean3.lastModified((File) null));
final ConfigurableApplicationContext applicationPlugin3 = SpringModuleUtils.getModuleSpringContext(moduleStateHolder, plugin3);
applicationPlugin3.close();