@AfterAll
    public static void afterClass() throws Exception {

        // Reset static fields after use (to not confuse other test classes).
        for (String fieldName : Arrays.asList("INSTANCE", "provider")) {
            Field field = GroupManager.class.getDeclaredField(fieldName);
            field.setAccessible(true);
            field.set(null, null);
            field.setAccessible(false);
        }

        GroupManager.getInstance().getGroups().forEach(group -> {
            try {
                GroupManager.getInstance().deleteGroup(group);
            } catch (GroupNotFoundException e) {
                throw new RuntimeException(e);
            }
        });

        groupCache.clear();
    }
Verifies the functionality as implemented by #Group

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