EasyMock.expect(component.getServiceInstance()).andReturn(originalSource).atLeastOnce();
EasyMock.expect(component.getServiceInterfaces()).andReturn(interfaces);
EasyMock.replay(component);
CompositeComponent composite = new CompositeComponentImpl("foo", null, null, null);
composite.start();
composite.register(component);
AtomicComponent atomicComponent = (AtomicComponent) composite.getSystemChild("source");
Source source = (Source) atomicComponent.getServiceInstance();
assertNotNull(source);