try
{
ClassLoader cl5 = getClassLoader(unit5);
assertGetResource("a/b/c/test-resource-deployment5", cl5);
Deployment deployment = new AbstractDeployment("test");
factory.addContext(deployment, "");
ClassLoadingMetaDataFactory clmdf = ClassLoadingMetaDataFactory.getInstance();
ClassLoadingMetaData clmd = new ClassLoadingMetaData();
clmd.getRequirements().addRequirement(clmdf.createRequireModule("test5"));
((MutableAttachments) deployment.getPredeterminedManagedObjects()).addAttachment(ClassLoadingMetaData.class, clmd);
DeployerClient main = assertBean("MainDeployer", DeployerClient.class);
main.deploy(deployment);
try
{
MainDeployerStructure mds = (MainDeployerStructure) main;
DeploymentUnit unit = mds.getDeploymentUnit(deployment.getName());
ClassLoader cl = unit.getClassLoader();
assertGetResource("a/b/c/test-resource-deployment5", cl);
}
finally
{