@Test()
    public void testGetNonExistingAuth() throws Exception
    {
        // Setup test fixture.
        HybridAuthProvider.PRIMARY_PROVIDER.setValue(TestAuthProvider.NoAuthProvider.class);
        HybridAuthProvider.SECONDARY_PROVIDER.setValue(TestAuthProvider.JaneAuthProvider.class);
        HybridAuthProvider.TERTIARY_PROVIDER.setValue(TestAuthProvider.JohnAuthProvider.class);
        final HybridAuthProvider provider = new HybridAuthProvider();

        // Execute system under test & Verify results.
        assertThrows(UserNotFoundException.class, () -> provider.getPassword("non-existing-user"));
    }
Verifies that an exception is thrown when a password for a non-existing user is being requested.
xmppserver/src/test/java/org/jivesoftware/openfire/auth/HybridAuthProviderTest.java