this.mockGroupService.stubs().method("getAllGroupsNamesForMember").will(returnValue(Collections.EMPTY_LIST));
this.mockGroupService.stubs().method("getAllMatchedGroups").will(returnValue(Collections.EMPTY_LIST));
Mock mockXWiki = mock(XWiki.class, new Class[] {}, new Object[] {});
mockXWiki.stubs().method("getStore").will(returnValue(mockStore.proxy()));
mockXWiki.stubs().method("getGroupService").will(returnValue(mockGroupService.proxy()));
mockXWiki.stubs().method("getCacheFactory").will(returnValue(this.cacheFactory));
mockXWiki.stubs().method("getXWikiPreference").will(returnValue(null));
mockXWiki.stubs().method("getXWikiPreferenceAsInt").will(throwException(new NumberFormatException("null")));
mockXWiki.stubs().method("isVirtualMode").will(returnValue(this.isVirtualMode));