@Test
public void test92searchXPermMap() {

	SearchCriteria testSearchCriteria = createsearchCriteria();
	testSearchCriteria.addParam("xUserId", userId);
	VXResource vxresource=new VXResource();
	VXPermMap vXPermMap=getVXPermMap();
	List<VXPermMap> vXPermMapList=new ArrayList<VXPermMap>();
	vXPermMapList.add(vXPermMap);
	VXPermMapList permMapList=new VXPermMapList();
	permMapList.setVXPermMaps(vXPermMapList);
	Mockito.when(xPermMapService.searchXPermMaps((SearchCriteria) Mockito.any())).thenReturn(permMapList);
	List<XXResource> xResourceList = new ArrayList<XXResource>();
	XXResource xRes = new XXResource();
	xRes.setId(userId);
	xRes.setName("hadoopdev");
	xRes.setIsRecursive(AppConstants.BOOL_TRUE);
	xRes.setResourceStatus(AppConstants.STATUS_ENABLED);
	xResourceList.add(xRes);
	XXResourceDao xxResourceDao = Mockito.mock(XXResourceDao.class);
	Mockito.when(daoManager.getXXResource()).thenReturn(xxResourceDao);
	Mockito.when(xxResourceDao.getById(Mockito.anyLong())).thenReturn(xRes);
	Mockito.when(xResourceService.populateViewBean(xRes)).thenReturn(vxresource);
	VXResponse vXResponse = new VXResponse();
	vXResponse.setStatusCode(VXResponse.STATUS_SUCCESS);
	Mockito.when(msBizUtil.hasPermission(vxresource, AppConstants.XA_PERM_TYPE_ADMIN)).thenReturn(vXResponse);
	VXPermMapList returnList=xUserMgr.searchXPermMaps(testSearchCriteria);
	Assert.assertNotNull(returnList);
	Assert.assertEquals(permMapList.getListSize(), returnList.getListSize());
}