@Test
public void test09CreateUser() {

	setup();
	XXPortalUserDao userDao = Mockito.mock(XXPortalUserDao.class);
	XXPortalUserRoleDao roleDao = Mockito.mock(XXPortalUserRoleDao.class);
	XXUserPermissionDao xUserPermissionDao = Mockito.mock(XXUserPermissionDao.class);
	XXGroupPermissionDao xGroupPermissionDao = Mockito.mock(XXGroupPermissionDao.class);
	XXPortalUser user = new XXPortalUser();
	VXPortalUser userProfile = userProfile();
	XXPortalUserRole XXPortalUserRole = new XXPortalUserRole();
	XXPortalUserRole.setId(userId);
	XXPortalUserRole.setUserRole("ROLE_USER");
	List<XXPortalUserRole> list = new ArrayList<XXPortalUserRole>();
	list.add(XXPortalUserRole);
	List<XXUserPermission> xUserPermissionsList = new ArrayList<XXUserPermission>();
	XXUserPermission xUserPermissionObj = new XXUserPermission();
	xUserPermissionObj.setAddedByUserId(userId);
	xUserPermissionObj.setCreateTime(new Date());
	xUserPermissionObj.setId(userId);
	xUserPermissionObj.setIsAllowed(1);
	xUserPermissionObj.setModuleId(1L);
	xUserPermissionObj.setUpdatedByUserId(userId);
	xUserPermissionObj.setUpdateTime(new Date());
	xUserPermissionObj.setUserId(userId);
	xUserPermissionsList.add(xUserPermissionObj);
	List<XXGroupPermission> xGroupPermissionList = new ArrayList<XXGroupPermission>();
	XXGroupPermission xGroupPermissionObj = new XXGroupPermission();
	xGroupPermissionObj.setAddedByUserId(userId);
	xGroupPermissionObj.setCreateTime(new Date());
	xGroupPermissionObj.setId(userId);
	xGroupPermissionObj.setIsAllowed(1);
	xGroupPermissionObj.setModuleId(1L);
	xGroupPermissionObj.setUpdatedByUserId(userId);
	xGroupPermissionObj.setUpdateTime(new Date());
	xGroupPermissionObj.setGroupId(userId);
	xGroupPermissionList.add(xGroupPermissionObj);
	Mockito.when(daoManager.getXXPortalUser()).thenReturn(userDao);
	Mockito.when(userDao.create((XXPortalUser) Mockito.any())).thenReturn(user);
	Mockito.when(daoManager.getXXPortalUserRole()).thenReturn(roleDao);
	Mockito.when(daoManager.getXXUserPermission()).thenReturn(xUserPermissionDao);
	Mockito.when(daoManager.getXXGroupPermission()).thenReturn(xGroupPermissionDao);
	Mockito.doNothing().when(rangerBizUtil).blockAuditorRoleUser();
	VXPortalUser dbVXPortalUser = userMgr.createUser(userProfile);
	Assert.assertNotNull(dbVXPortalUser);
	Assert.assertEquals(user.getId(), dbVXPortalUser.getId());
	Assert.assertEquals(user.getFirstName(), dbVXPortalUser.getFirstName());
	Assert.assertEquals(user.getLastName(), dbVXPortalUser.getLastName());
	Assert.assertEquals(user.getLoginId(), dbVXPortalUser.getLoginId());
	Assert.assertEquals(user.getEmailAddress(),dbVXPortalUser.getEmailAddress());
	Assert.assertEquals(user.getPassword(), dbVXPortalUser.getPassword());
	Mockito.verify(daoManager).getXXPortalUser();
	Mockito.verify(daoManager).getXXUserPermission();
	Mockito.verify(daoManager).getXXGroupPermission();
}