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();