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);