MockRepository mockRepository = new MockRepository();
ArtifactManager artifactManager = new DefaultArtifactManager();
ArtifactResolver artifactResolver = new DefaultArtifactResolver(artifactManager, Collections.singleton(mockRepository), null);
ConfigurationManager configurationManager = new SimpleConfigurationManager(Collections.EMPTY_SET, artifactResolver, Collections.EMPTY_SET);
DeploymentContext context = new DeploymentContext(outFile, null, environment, ConfigurationModuleType.CAR, naming, configurationManager, Collections.singleton(mockRepository));
AbstractName j2eeContext = naming.createRootName(environment.getConfigId(), environment.getConfigId().toString(), "Configuration");
GbeanType[] gbeans = plan.getGbeanArray();
ServiceConfigBuilder.addGBeans(gbeans, cl, j2eeContext, context);
Set gbeanNames = context.getGBeanNames();
assertEquals(1, gbeanNames.size());