MockClassLoadingMetaData a = new MockClassLoadingMetaData("a");
a.setPathsAndPackageNames(A.class, B.class);
KernelControllerContext contextA = install(a);
try
{
MockClassLoaderPolicyModule module = assertModule(contextA);
ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
List<Capability> capabilities = new ArrayList<Capability>();
capabilities.add(factory.createModule("a"));
capabilities.add(factory.createPackage(A.class.getPackage().getName()));
capabilities.add(factory.createPackage(B.class.getPackage().getName()));
assertEquals(capabilities, module.getCapabilities());
}
finally
{
uninstall(contextA);
}