final Component component = findComponentByName( "test_multi_service_bind_unbind_order" );
TestCase.assertNotNull( component );
TestCase.assertEquals( Component.STATE_DISABLED, component.getState() );
final SimpleServiceImpl srv1 = SimpleServiceImpl.create( bundleContext, "srv1" );
final SimpleService2Impl srv2 = SimpleService2Impl.create( bundleContext, "srv2" );
// async enabling
component.enable();
delay();
TestCase.assertEquals( Component.STATE_ACTIVE, component.getState() );
final SimpleComponent2 comp10 = SimpleComponent2.INSTANCE;
TestCase.assertNotNull( comp10 );
TestCase.assertEquals( 2, comp10.getBindings().size() );
TestCase.assertEquals( "bindSimpleService", comp10.getBindings().get( 0 ) );
TestCase.assertEquals( "bindSimpleService2", comp10.getBindings().get( 1 ) );
component.disable();
delay();
TestCase.assertEquals( 4, comp10.getBindings().size() );
TestCase.assertEquals( "bindSimpleService", comp10.getBindings().get( 0 ) );
TestCase.assertEquals( "bindSimpleService2", comp10.getBindings().get( 1 ) );
TestCase.assertEquals( "unbindSimpleService2", comp10.getBindings().get( 2 ) );
TestCase.assertEquals( "unbindSimpleService", comp10.getBindings().get( 3 ) );
srv1.drop();
srv2.drop();
}