public void testCreateGroupWithEmptyNameThrows() throws Exception
    {
        final String GROUP_NAME = "";
        final GroupManager groupManager = GroupManager.getInstance();
        assertThrows(GroupNameInvalidException.class, ()-> groupManager.createGroup(GROUP_NAME));
    }
Asserts that a with no name cannot be created
xmppserver/src/test/java/org/jivesoftware/openfire/group/GroupManagerNoMockTest.java