try
{
BeanMetaData fsMD = new AbstractBeanMetaData("fileStructure", TmpFileStructure.class.getName());
KernelControllerContext fsCC = controller.install(fsMD);
assertEquals(fsCC.getState(), ControllerState.INSTALLED);
TmpFileStructure fs = (TmpFileStructure)fsCC.getTarget();
assertNotNull(fs);
VirtualFile file = getVirtualFile();
assertFalse(fs.checkFileMatchers(file));
BeanMetaData fmMD = new AbstractBeanMetaData("bshFileMatcher", BshFileMatcher.class.getName());
controller.install(fmMD);
assertTrue(fs.checkFileMatchers(file));
controller.uninstall(fmMD.getName());
assertFalse(fs.checkFileMatchers(file));
}
finally
{
controller.shutdown();
}