super(true /* start test components bundle */);
}
@Test
public void testAspectChain() throws Throwable {
Ensure e = new Ensure();
// Activate service consumer
ServiceRegistration scSequencer = register(e, ServiceConsumer.ENSURE);
// Activate service provider
ServiceRegistration spSequencer = register(e, ServiceProvider.ENSURE);
// Activate service aspect 2
ServiceRegistration sa2Sequencer = register(e, ServiceAspect2.ENSURE);
// Activate service aspect 3
ServiceRegistration sa3Sequencer = register(e, ServiceAspect3.ENSURE);
// Activate service aspect 1
ServiceRegistration sa1Sequencer = register(e, ServiceAspect1.ENSURE);
e.step();
e.waitForStep(6, 10000);
// Deactivate service provider
spSequencer.unregister();
// Make sure that service aspect 1 has been called in ts removed and stop callbacks
e.waitForStep(8, 10000);
e.ensure();
scSequencer.unregister();
sa1Sequencer.unregister();
sa2Sequencer.unregister();
sa3Sequencer.unregister();