SystemImplementation impl = new SystemImplementation();
impl.setComponentType(type);
impl.setImplementationClass(FooImpl.class);
ComponentDefinition<SystemImplementation> definition = new ComponentDefinition<SystemImplementation>(impl);
AtomicComponent component = builder.build(parent, definition, deploymentContext);
component.start();
container.onEvent(new CompositeStart(this, null));
FooImpl foo = (FooImpl) component.getServiceInstance();
assertTrue(foo.initialized);
container.onEvent(new CompositeStop(this, null));
assertTrue(foo.destroyed);