@Test
    public void testGetUserNamesFromAllProviders() throws Exception
    {
        // Setup test fixture.
        HybridUserProvider.PRIMARY_PROVIDER.setValue(TestUserProvider.NoUserProvider.class);
        HybridUserProvider.SECONDARY_PROVIDER.setValue(TestUserProvider.JaneUserProvider.class);
        HybridUserProvider.TERTIARY_PROVIDER.setValue(TestUserProvider.JohnUserProvider.class);
        final HybridUserProvider provider = new HybridUserProvider();

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

        // Verify results.
        assertEquals(2, result.size());
        assertTrue(result.contains("jane"));
        assertTrue(result.contains("john"));
    }
Verifies that users are returned from all providers.
xmppserver/src/test/java/org/jivesoftware/openfire/user/HybridUserProviderTest.java