ListableRepository mockRepository = new MockRepository(repo);
ArtifactManager artifactManager = new DefaultArtifactManager();
ArtifactResolver artifactResolver = new DefaultArtifactResolver(artifactManager, mockRepository);
ConfigurationManager configurationManager = new SimpleConfigurationManager(Collections.EMPTY_SET, artifactResolver, Collections.EMPTY_SET, bundleContext);
bundleContext.setConfigurationManager(configurationManager);
AbstractName moduleName = naming.createRootName(environment.getConfigId(), "foo", "bar");
DeploymentContext context = new DeploymentContext(outFile, null, environment, moduleName, ConfigurationModuleType.CAR, naming, configurationManager, Collections.<Repository>singleton(mockRepository), bundleContext);
context.initializeConfiguration();
gbeanBuilder.build(plan, context, context);
Set gbeanNames = context.getGBeanNames();
assertEquals(1, gbeanNames.size());