@Test
public void test18ChangeEmailAddress() {

	XXPortalUser xxPUser = new XXPortalUser();
	VXPortalUser vxPUserExp = CreateVXPortalUser();
	XXPortalUserDao xxPortalUserDao = Mockito.mock(XXPortalUserDao.class);
	Mockito.when(daoManager.getXXPortalUser()).thenReturn(xxPortalUserDao);
	Mockito.when(restErrorUtil.createRESTException("serverMsg.userRestUser",MessageEnums.DATA_NOT_FOUND, null, null, changePassword.getLoginId())).thenThrow(new WebApplicationException());
	thrown.expect(WebApplicationException.class);
	VXPortalUser vxPortalUserAct = userREST.changeEmailAddress(userId, changePassword);
	Assert.assertNotNull(vxPortalUserAct);
	Assert.assertEquals(vxPUserExp, vxPortalUserAct);
	Assert.assertEquals(vxPUserExp.getId(), vxPortalUserAct.getId());
	Assert.assertEquals(vxPUserExp.getFirstName(), vxPortalUserAct.getFirstName());
	Mockito.verify(daoManager).getXXPortalUser();
	Mockito.verify(xxPortalUserDao).getById(userId);
	Mockito.verify(userManager).checkAccessForUpdate(xxPUser);
	Mockito.verify(changePassword).setId(userId);
	Mockito.verify(userManager).changeEmailAddress(xxPUser, changePassword);
}