@Test
    public void testGetGroupNamesFromAllProviders() throws Exception
    {
        // Setup test fixture.
        HybridGroupProvider.PRIMARY_PROVIDER.setValue(TestGroupProvider.NoGroupProvider.class);
        HybridGroupProvider.SECONDARY_PROVIDER.setValue(TestGroupProvider.LittleEndiansGroupProvider.class);
        HybridGroupProvider.TERTIARY_PROVIDER.setValue(TestGroupProvider.BigEndiansGroupProvider.class);
        final HybridGroupProvider provider = new HybridGroupProvider();

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

        // Verify results.
        assertEquals(2, result.size());
        assertTrue(result.contains("little-endians"));
        assertTrue(result.contains("big-endians"));
    }
Verifies that groups are returned from all providers.
xmppserver/src/test/java/org/jivesoftware/openfire/group/HybridGroupProviderTest.java