public Group getGroup(JID jid) throws GroupNotFoundException {
        JID groupJID = GroupJID.fromJID(jid);
        return (groupJID instanceof GroupJID) ? getGroup(((GroupJID)groupJID).getGroupName()) : null;
    }
@Test
    public void willCacheAMissIfNotAlreadyCached() throws Exception {

        doThrow(new GroupNotFoundException()).when(groupProvider).getGroup(GROUP_NAME);

        try {
            groupManager.getGroup(GROUP_NAME, false);
        } catch (final GroupNotFoundException ignored) {
            verify(groupProvider).getGroup(GROUP_NAME);
            assertThat(groupCache.get(GROUP_NAME), is(CacheableOptional.of(null)));
            return;
        }
        fail();
    }