List<IModActivator> activators1 = new LinkedList<IModActivator>();
manager.initializeBundle(b1,activators1);
assertTrue( activators1.size() == 2 );
assertTrue( manager.getActivators().size() == 2 );
IModActivator act1 = activators1.get(0);
assertTrue( act1.getStatus() == IModActivator.STATUS.INITIALIZED );
manager.enableActivators(activators1);
assertTrue( act1.getStatus() == IModActivator.STATUS.ENABLED );
manager.disableActivators(activators1);
MyConfig a3 = new MyConfig( SimpleActivator.class.getCanonicalName(), new XmlConfig( null, MXml.loadXml("<c/>").getDocumentElement() ) );
MyConfig a4 = new MyConfig( SimpleActivator.class.getCanonicalName(), new XmlConfig( null, MXml.loadXml("<c/>").getDocumentElement() ) );
IModConfig[] ac2 = new IModConfig[] { a3, a4 };
MyBundle b2 = new MyBundle("mybundle", false, ac2 );
List<IModActivator> activators2 = new LinkedList<IModActivator>();
manager.initializeBundle(b2,activators2);
assertTrue( activators2.size() == 2 );
assertTrue( manager.getActivators().size() == 4 );
IModActivator act2 = activators2.get(0);
assertTrue( act2.getStatus() == IModActivator.STATUS.INITIALIZED );
manager.enableActivators(activators2);
assertTrue( act2.getStatus() == IModActivator.STATUS.ENABLED );
manager.disableActivators(activators2);
assertTrue( act1.getStatus() == IModActivator.STATUS.DISABLED );
manager.disposeActivators(activators1);
assertTrue( act1.getStatus() == IModActivator.STATUS.CLOSED );
assertTrue( act2.getStatus() == IModActivator.STATUS.DISABLED );
manager.disposeActivators(activators2);
assertTrue( act2.getStatus() == IModActivator.STATUS.CLOSED );
assertTrue( manager.getActivators().size() == 0 );
}