assertEquals(ComponentInstance.VALID, instancec1.getState());
assertEquals(ComponentInstance.VALID, instancec2.getState());
assertEquals(ComponentInstance.VALID, instancec3.getState());
// Call C3
C3 svc = (C3) getServiceObject(C3, null);
assertNotNull(svc);
assertEquals("called", svc.getFilter().authenticate());
// So far, all right
//We stop c1 and c2.
instancec1.stop();
instancec2.stop();
assertEquals(ComponentInstance.INVALID, instancec3.getState()); // C2 dependency invalid
instancec1.start();
instancec2.start();
// Check that everything is OK
assertEquals(ComponentInstance.VALID, instancec1.getState());
assertEquals(ComponentInstance.VALID, instancec2.getState());
assertEquals(ComponentInstance.VALID, instancec3.getState());
// Call C3
svc = (C3) getServiceObject(C3, null);
assertNotNull(svc);
assertEquals("called", svc.getFilter().authenticate());
}