public void testDeleteGroupShared() throws Exception {
        final JID needle = new JID("jane@example.org");
        final GroupManager groupManager = GroupManager.getInstance();
        final Group groupA = groupManager.createGroup("Test Group A");
        groupA.shareWithEverybody("Users in group A");
        groupManager.createGroup("Test Group B");

        groupManager.deleteGroup(groupA);
        final Collection<Group> result = groupManager.getSharedGroups(needle.getNode());

        assertEquals(0, result.size());
    }
Verifies that {@link GroupManager#deleteGroup(Group)} deletes a shared group, such that it cannot be retrieved
xmppserver/src/test/java/org/jivesoftware/openfire/group/GroupManagerNoMockTest.java