@Test
    public void Basic_plan_attached_to_multiple_api_versions_should_inherit_highest_visibility_in_index() {
        index.index(List.of(
                discovEntity("Petstore:Metrics:1.0","Petstore","Metrics","1.0",null, null,ORG_MEMBERS), // Public API

                discovEntity("Petstore:Metrics:1.0:Gold:1.0","Petstore","Metrics","1.0","Gold","1.0",ORG_MEMBERS),
                discovEntity("Petstore:Metrics:1.0:Sandbox:1.0","Petstore","Metrics","1.0","Sandbox","1.0",ORG_MEMBERS),

                discovEntity("Petstore:Petstore:1.0","Petstore","Petstore","1.0", null, null,ORG_MEMBERS), // Public API
                discovEntity("Petstore:Petstore:1.0:Basic:1.0","Petstore","Petstore","1.0","Basic","1.0", PORTAL), // <-- important (same plan)

                discovEntity("Petstore:Test:1.0","Petstore","Test","1.0","","",ORG_MEMBERS),
                discovEntity("Petstore:Test:1.0:Basic:1.0","Petstore","Test","1.0","Basic","1.0",ORG_MEMBERS) // <-- important (same plan)
        ));

        DILookupResult apiResult = index.isAnyDiscoverable(EntityType.API, "Petstore", "Petstore", DiscoverabilityLevel.NON_MEMBERS);
        assertThat(apiResult).isEqualTo(DILookupResult.DISCOVERABLE);

        DILookupResult planResult = index.isAnyDiscoverable(EntityType.PLAN, "Petstore", "Basic", DiscoverabilityLevel.NON_MEMBERS);
        assertThat(planResult).isEqualTo(DILookupResult.DISCOVERABLE);
    }
Test cases for <a href="https://github.com/apiman/apiman/issues/2209">apiman#2209</a>.

@author Marc Savy {@literal <marc@blackparrotlabs.io>}
manager/api/security/src/test/java/io/apiman/manager/api/security/impl/IndexedDiscoverabilitiesCombinedTest.java