@Override
        public User createUser(final String username, final String password, final String name, final String email) throws UserAlreadyExistsException {
            if (users.containsKey(username)) {
                throw new UserAlreadyExistsException();
            }
            final User user = mock(User.class, withSettings().lenient());
            doReturn(username).when(user).getUsername();
            doReturn(name).when(user).getName();
            doReturn(email).when(user).getEmail();
            doReturn(new Date()).when(user).getCreationDate();
            doReturn(new Date()).when(user).getModificationDate();
            users.put(username, user);
            return user;
        }
As {@link #reconfigureOpenfireHome()} allows properties to persist, this method clears all existing properties
(both XML and 'database') to ensure clean test output. Ideally should be called in a {@link org.junit.Before} method.

@param except properties that are not cleared if they are set.
xmppserver/src/test/java/org/jivesoftware/Fixtures.java