@Test
public void test01CreateUser() {

	setup();
	XXPortalUserDao userDao = Mockito.mock(XXPortalUserDao.class);
	XXPortalUserRoleDao roleDao = Mockito.mock(XXPortalUserRoleDao.class);
	VXPortalUser userProfile = userProfile();
	Collection<String> userRoleList = new ArrayList<String>();
	userRoleList.add("ROLE_USER");
	XXPortalUser user = new XXPortalUser();
	user.setEmailAddress(userProfile.getEmailAddress());
	user.setFirstName(userProfile.getFirstName());
	user.setLastName(userProfile.getLastName());
	user.setLoginId(userProfile.getLoginId());
	user.setPassword(userProfile.getPassword());
	user.setUserSource(userProfile.getUserSource());
	user.setPublicScreenName(userProfile.getPublicScreenName());
	user.setId(userProfile.getId());
	XXPortalUserRole XXPortalUserRole = new XXPortalUserRole();
	XXPortalUserRole.setId(user.getId());
	XXPortalUserRole.setUserRole("ROLE_USER");
	List<XXPortalUserRole> list = new ArrayList<XXPortalUserRole>();
	list.add(XXPortalUserRole);
	Mockito.when(daoManager.getXXPortalUser()).thenReturn(userDao);
	Mockito.when(userDao.create((XXPortalUser) Mockito.any())).thenReturn(user);
	Mockito.when(daoManager.getXXPortalUserRole()).thenReturn(roleDao);
	Mockito.when(roleDao.findByUserId(userId)).thenReturn(list);
	Mockito.doNothing().when(rangerBizUtil).blockAuditorRoleUser();
	XXPortalUser dbxxPortalUser = userMgr.createUser(userProfile, 1,userRoleList);
	Assert.assertNotNull(dbxxPortalUser);
	userId = dbxxPortalUser.getId();
	Assert.assertEquals(userId, dbxxPortalUser.getId());
	Assert.assertEquals(userProfile.getFirstName(),dbxxPortalUser.getFirstName());
	Assert.assertEquals(userProfile.getFirstName(),dbxxPortalUser.getFirstName());
	Assert.assertEquals(userProfile.getLastName(),dbxxPortalUser.getLastName());
	Assert.assertEquals(userProfile.getLoginId(),dbxxPortalUser.getLoginId());
	Assert.assertEquals(userProfile.getEmailAddress(),dbxxPortalUser.getEmailAddress());
	Assert.assertEquals(userProfile.getPassword(),dbxxPortalUser.getPassword());
	Mockito.verify(daoManager).getXXPortalUser();
	Mockito.verify(daoManager).getXXPortalUserRole();
}