@Test()
    public void testGetNonExistingUser() throws Exception
    {
        // Setup test fixture.
        JiveGlobals.setProperty(MappedUserProvider.PROPERTY_MAPPER_CLASSNAME, TestUserProviderMapper.class.getName());
        final MappedUserProvider provider = new MappedUserProvider();

        // 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/MappedUserProviderTest.java