@SuppressWarnings("unchecked")
@Test
public void test11searchXGroups() {

	HttpServletRequest request = Mockito.mock(HttpServletRequest.class);
	SearchCriteria testSearchCriteria=createsearchCriteria();
	Mockito.when(searchUtil.extractCommonCriterias((HttpServletRequest)Mockito.any() ,(List<SortField>)Mockito.any())).thenReturn(testSearchCriteria);

	Mockito.when(searchUtil.extractString(request, testSearchCriteria, "name", "group name", null)).thenReturn("");
	Mockito.when(searchUtil.extractInt(request, testSearchCriteria, "isVisible", "Group Visibility")).thenReturn(1);
	Mockito.when(searchUtil.extractInt(request, testSearchCriteria, "groupSource", "group source")).thenReturn(1);
	VXGroupList testvXGroupList=createxGroupList();
	Mockito.when(xUserMgr.searchXGroups(testSearchCriteria)).thenReturn(testvXGroupList);
	VXGroupList outputvXGroupList=xUserRest.searchXGroups(request);
	
	Mockito.verify(xUserMgr).searchXGroups(testSearchCriteria);
	Mockito.verify(searchUtil).extractCommonCriterias((HttpServletRequest)Mockito.any() ,(List<SortField>)Mockito.any());
	Mockito.verify(searchUtil).extractString(request, testSearchCriteria, "name", "group name", null);
	Mockito.verify(searchUtil).extractInt(request, testSearchCriteria, "isVisible", "Group Visibility");
	Mockito.verify(searchUtil).extractInt(request, testSearchCriteria, "groupSource", "group source");
	assertNotNull(outputvXGroupList);
	assertEquals(outputvXGroupList.getTotalCount(),testvXGroupList.getTotalCount());
	assertEquals(outputvXGroupList.getClass(),testvXGroupList.getClass());
	
}