final Manager wm = lookup(Manager.class);
waitForRoutingBackgroundUpdates();
// after member change, group1 should have proxy1, proxy2 and proxy3 WL in group
{
final PrefixSource groupPrefixSource =
wm.getPrefixSourceFor(getRepositoryRegistry().getRepositoryWithFacet(GROUP1_REPO_ID,
MavenRepository.class));
assertThat("Group1 should have WL", groupPrefixSource.supported());
final List<String> groupEntries = groupPrefixSource.readEntries();
assertThat(groupEntries, hasSize(4));
assertThat(groupEntries, hasItem("/org/apache"));
assertThat(groupEntries, hasItem("/org/sonatype"));
assertThat(groupEntries, hasItem("/com/sonatype"));
assertThat(groupEntries, hasItem("/eu/flatwhite"));
}
// after member change, group2 should have g1+p3 but is same as g1 (since p3 is member of g1 too) -- (WL is
// kept unique)
{
final PrefixSource groupPrefixSource =
wm.getPrefixSourceFor(getRepositoryRegistry().getRepositoryWithFacet(GROUP2_REPO_ID,
MavenRepository.class));
assertThat("Group2 should have WL", groupPrefixSource.supported());
final List<String> groupEntries = groupPrefixSource.readEntries();
assertThat(groupEntries, hasSize(4));
assertThat(groupEntries, hasItem("/org/apache"));
assertThat(groupEntries, hasItem("/org/sonatype"));
assertThat(groupEntries, hasItem("/com/sonatype"));
assertThat(groupEntries, hasItem("/eu/flatwhite"));