@Test
    /** TODO this test works if we assume most recent version wins, but semantics TBC */
    public void testMoreEntityV2ThenV1GivesV1() throws Exception {
        TestResourceUnavailableException.throwIfResourceUnavailable(getClass(), "/brooklyn/osgi/brooklyn-test-osgi-more-entities_0.1.0.jar");
        TestResourceUnavailableException.throwIfResourceUnavailable(getClass(), "/brooklyn/osgi/brooklyn-test-osgi-more-entities_0.2.0.jar");
        TestResourceUnavailableException.throwIfResourceUnavailable(getClass(), "/brooklyn/osgi/brooklyn-test-osgi-entities.jar");
        addCatalogItems(getLocalResource("more-entity-v2-osgi-catalog.yaml"));
        forceCatalogUpdate();
        addCatalogItems(getLocalResource("more-entity-v1-osgi-catalog.yaml"));
        Entity app = createAndStartApplication("services: [ { type: 'more-entity:1.0' } ]");
        Entity moreEntity = Iterables.getOnlyElement(app.getChildren());
        OsgiVersionMoreEntityTest.assertV1EffectorCall(moreEntity);
        OsgiVersionMoreEntityTest.assertV1MethodCall(moreEntity);
    }
@Test
   
    public void testMoreEntityV2ThenV1GivesV1() throws Exception {
        TestResourceUnavailableException.throwIfResourceUnavailable(getClass(), "/brooklyn/osgi/brooklyn-test-osgi-more-entities_0.1.0.jar");
        TestResourceUnavailableException.throwIfResourceUnavailable(getClass(), "/brooklyn/osgi/brooklyn-test-osgi-more-entities_0.2.0.jar");
        TestResourceUnavailableException.throwIfResourceUnavailable(getClass(), "/brooklyn/osgi/brooklyn-test-osgi-entities.jar");
        addCatalogItems(getLocalResource("more-entity-v2-osgi-catalog.yaml"));
        forceCatalogUpdate();
        addCatalogItems(getLocalResource("more-entity-v1-osgi-catalog.yaml"));
        Entity app = createAndStartApplication("services: [ { type: 'more-entity:1.0' } ]");
        Entity moreEntity = Iterables.getOnlyElement(app.getChildren());
        OsgiVersionMoreEntityTest.assertV1EffectorCall(moreEntity);
        OsgiVersionMoreEntityTest.assertV1MethodCall(moreEntity);
    }
@test public void testmoreentityv2thenv1givesv1() throws exception { testresourceunavailableexception.throwifresourceunavailable(getclass(), "/brooklyn/osgi/brooklyn-test-osgi-more-entities_0.1.0.jar"); testresourceunavailableexception.throwifresourceunavailable(getclass(), "/brooklyn/osgi/brooklyn-test-osgi-more-entities_0.2.0.jar"); testresourceunavailableexception.throwifresourceunavailable(getclass(), "/brooklyn/osgi/brooklyn-test-osgi-entities.jar"); addcatalogitems(getlocalresource("more-entity-v2-osgi-catalog.yaml")); forcecatalogupdate(); addcatalogitems(getlocalresource("more-entity-v1-osgi-catalog.yaml")); entity app = createandstartapplication("services: [ { type: 'more-entity:1.0' } ]"); entity moreentity = iterables.getonlyelement(app.getchildren()); osgiversionmoreentitytest.assertv1effectorcall(moreentity); osgiversionmoreentitytest.assertv1methodcall(moreentity); }