@Override
    public Group createGroup(String name) throws GroupAlreadyExistsException, GroupNameInvalidException
    {
        if (data.containsKey(name)) {
            throw new GroupAlreadyExistsException();
        }
        final Group group = new Group(name, "Used in unit tests", Collections.emptySet(), Collections.emptySet());
        data.put(name, group);
        return group;
    }
A very basic implementation of a GroupProvider, that retains data in-memory.

@author Guus der Kinderen, guus@goodbytes.nl
xmppserver/src/test/java/org/jivesoftware/openfire/group/TestGroupProvider.java