@Test
public void testGetXUserId_NoUser(){

	RangerSecurityContext context = new RangerSecurityContext();
	context.setUserSession(new UserSessionBase());
	RangerContextHolder.setSecurityContext(context);
	XXPortalUser xxPortalUser = new XXPortalUser();
	xxPortalUser.setId(id);
	xxPortalUser.setLoginId("12121");
	context.getUserSession().setXXPortalUser(xxPortalUser);
	XXUser xxUser = new XXUser();
	XXUserDao xxUserDao = Mockito.mock(XXUserDao.class);
	XXPortalUserDao xxPortalUserDao = Mockito.mock(XXPortalUserDao.class);
	Mockito.when(daoManager.getXXPortalUser()).thenReturn(xxPortalUserDao);
	Mockito.when(xxPortalUserDao.getById(Mockito.anyLong())).thenReturn(xxPortalUser);
	Mockito.when(daoManager.getXXUser()).thenReturn(xxUserDao);
	Mockito.when(xxUserDao.findByUserName(Mockito.anyString())).thenReturn(xxUser);
	Long chk = rangerBizUtil.getXUserId();
	Mockito.verify(daoManager).getXXPortalUser();
	Mockito.verify(xxPortalUserDao).getById(Mockito.anyLong());
	Mockito.verify(daoManager).getXXUser();
	Mockito.verify(xxUserDao).findByUserName(Mockito.anyString());
	Assert.assertNull(chk);
}