public void testSharedGroupNamesOneWithMix() throws Exception
    {
        // Setup test fixture.
        final DefaultGroupProvider provider = new DefaultGroupProvider();
        provider.createGroup("Test Group A").shareWithUsersInSameGroup("Users in group A");
        provider.createGroup("Test Group B").shareWithEverybody("Users in group B");

        // Execute system under test.
        final Collection<String> result = provider.getSharedGroupNames();

        // Verify result.
        assertEquals(2, result.size());
        assertTrue(result.contains("Test Group A"));
        assertTrue(result.contains("Test Group B"));
    }
Verifies that a {@link AbstractGroupProvider#getSharedGroupNames()} returns nothing a group that is shared with
everyone and another group that is shared explicitly with members of that group.
xmppserver/src/test/java/org/jivesoftware/openfire/group/AbstractGroupProviderTest.java