public void testGetVisibleGroupNamesWithGroupSharedWithItself() throws Exception {
        final DefaultGroupProvider provider = new DefaultGroupProvider();
        provider.createGroup("Test Group A").shareWithUsersInSameGroup("Users in Test Group A");
        final Collection<String> result = provider.getVisibleGroupNames("Test Group A");
        assertEquals(1, result.size());
        assertTrue(result.contains("Test Group A"));
    }
Verifies that a {@link AbstractGroupProvider#getVisibleGroupNames(String)} returns a group shared with itself
xmppserver/src/test/java/org/jivesoftware/openfire/group/AbstractGroupProviderTest.java