@Test
    public void testCountsGroupsFromAllProviders() 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 int result = provider.getGroupCount();

        // Verify results.
        assertEquals(2, result);
    }
Verifies that the group count is based on data from all providers.
xmppserver/src/test/java/org/jivesoftware/openfire/group/HybridGroupProviderTest.java