@Test
public void test31deleteXUserPermission() {

	UserSessionBase userSession = Mockito.mock(UserSessionBase.class);
	Set<UserSessionBase> userSessions = new HashSet<UserSessionBase>();
	userSessions.add(userSession);
	XXUserPermission xUserPermissionObj = xxUserPermission();
	XXUserPermissionDao xUserPermDao = Mockito.mock(XXUserPermissionDao.class);
	Mockito.when(daoManager.getXXUserPermission()).thenReturn(xUserPermDao);
	Mockito.when(xUserPermDao.getById(1L)).thenReturn(xUserPermissionObj);
	Mockito.when(xUserPermissionService.deleteResource(1L)).thenReturn(true);
	Mockito.when(sessionMgr.getActiveUserSessionsForPortalUserId(xUserPermissionObj.getUserId())).thenReturn(userSessions);
	xUserMgr.deleteXUserPermission(1L, true);
	Mockito.verify(xUserPermissionService).deleteResource(1L);
}