}
protected void doTest(String componentName) throws Exception
{
ServiceRegistration dep1Reg = register(new SimpleComponent(), 0);
ServiceRegistration dep2Reg = register(new SimpleComponent2(), 1000);
final ComponentDescriptionDTO main = findComponentDescriptorByName(componentName);
TestCase.assertNotNull(main);
asyncEnable(main); //needs to be async
delay(300); //dep2 getService has not yet returned
dep1Reg.unregister();
delay(2000); //dep2 getService has returned
Felix4350Component.check(0, 0, false);
dep1Reg = register(new SimpleComponent(), 0);
delay(300);
Felix4350Component.check(1, 0, true);
disableAndCheck(main); //does not need to be asyncv??
dep1Reg.unregister();
dep2Reg.unregister();
Felix4350Component.check(1, 1, false);
dep1Reg = register(new SimpleComponent(), 0);
dep2Reg = register(new SimpleComponent2(), 1000);
Felix4350Component.check(1, 1, false);
asyncEnable(main); //needs to be async
delay(300);
dep1Reg.unregister();