@Test()
    public void testGetNonExistingUser() 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 & Verify results.
        assertThrows(UserNotFoundException.class, () -> provider.loadUser("non-existing-user"));
    }
Verifies that an exception is thrown when a non-existing user is being requested.
xmppserver/src/test/java/org/jivesoftware/openfire/user/HybridUserProviderTest.java