}
public void testRegisterSystemService() 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);
assertNull(parent.getChild("bar"));
assertNotNull(parent.getSystemChild("bar"));
EasyMock.verify(component);
}