* Verifies a system service and application component can be registered with the same name in a composite
*/
public void testSystemServiceApplicationNamespaceIsolation() throws Exception {
List<Class<?>> services = new ArrayList<Class<?>>();
services.add(Foo.class);
CompositeComponent parent = new CompositeComponentImpl("foo", "foo", null, null, null);
SystemAtomicComponent component = EasyMock.createMock(SystemAtomicComponent.class);
EasyMock.expect(component.getName()).andReturn("bar").atLeastOnce();
EasyMock.expect(component.getServiceInterfaces()).andReturn(services);
EasyMock.expect(component.isSystem()).andReturn(true).atLeastOnce();
EasyMock.replay(component);
parent.register(component);
AtomicComponent component2 = EasyMock.createMock(AtomicComponent.class);
EasyMock.expect(component2.getName()).andReturn("bar").atLeastOnce();
EasyMock.expect(component2.getServiceInterfaces()).andReturn(services);
EasyMock.expect(component2.isSystem()).andReturn(false).atLeastOnce();
EasyMock.replay(component2);
parent.register(component2);
EasyMock.verify(component);
EasyMock.verify(component2);
}