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


	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", "User name", null)).thenReturn("");
	Mockito.when(searchUtil.extractString(request, testSearchCriteria, "emailAddress", "Email Address",null)).thenReturn("");
	Mockito.when(searchUtil.extractInt(request, testSearchCriteria, "userSource", "User Source")).thenReturn(1);
	Mockito.when(searchUtil.extractInt(request, testSearchCriteria, "isVisible", "User Visibility")).thenReturn(1);
	Mockito.when(searchUtil.extractInt(request, testSearchCriteria, "status", "User Status")).thenReturn(1);
	Mockito.when(searchUtil.extractStringList(request, testSearchCriteria, "userRoleList", "User Role List", "userRoleList", null,null)).thenReturn(new ArrayList<String>());
	Mockito.when(searchUtil.extractRoleString(request, testSearchCriteria, "userRole", "Role", null)).thenReturn("");
	
	List<VXUser> vXUsersList= new ArrayList<VXUser>();
	vXUsersList.add(vxUser);
	VXUserList testVXUserList= new VXUserList();
	testVXUserList.setVXUsers(vXUsersList);
	
	Mockito.when(xUserMgr.searchXUsers(testSearchCriteria)).thenReturn(testVXUserList);
	VXUserList gotVXUserList=xUserRest.searchXUsers(request);
	
	Mockito.verify(xUserMgr).searchXUsers(testSearchCriteria);
	Mockito.verify(searchUtil).extractCommonCriterias((HttpServletRequest)Mockito.any() ,(List<SortField>)Mockito.any());
	Mockito.verify(searchUtil).extractString(request, testSearchCriteria, "name", "User name", null);
	Mockito.verify(searchUtil).extractString(request, testSearchCriteria, "emailAddress", "Email Address",null);
	Mockito.verify(searchUtil).extractInt(request, testSearchCriteria, "userSource", "User Source");
	Mockito.verify(searchUtil).extractInt(request, testSearchCriteria, "isVisible", "User Visibility");
	Mockito.verify(searchUtil).extractInt(request, testSearchCriteria, "status", "User Status");
	Mockito.verify(searchUtil).extractStringList(request, testSearchCriteria, "userRoleList", "User Role List", "userRoleList", null,null);
	Mockito.verify(searchUtil).extractRoleString(request, testSearchCriteria, "userRole", "Role", null);
	assertNotNull(gotVXUserList);
	assertEquals(testVXUserList.getTotalCount(),gotVXUserList.getTotalCount());
	assertEquals(testVXUserList.getClass(),gotVXUserList.getClass());
}