List<Class<?>> interfaces = new ArrayList<Class<?>>();
interfaces.add(Source.class);
interfaces.add(Source2.class);
Source originalSource = new SourceImpl();
AtomicComponent component = EasyMock.createMock(AtomicComponent.class);
EasyMock.expect(component.getName()).andReturn("source").atLeastOnce();
EasyMock.expect(component.getServiceInstance()).andReturn(originalSource).atLeastOnce();
EasyMock.expect(component.getServiceInterfaces()).andReturn(interfaces);
EasyMock.expect(component.isSystem()).andReturn(false).atLeastOnce();
EasyMock.replay(component);
parent.register(component);
Source source = parent.resolveInstance(Source.class);