String noEmailOrTokenError = "Email address was not found in response " + MartinlawConstants.OPENID_ERROR_MSG_INDICATOR;
// test for when no token exists
assertEquals("no token has been setup", noEmailOrTokenError, successHandler.getActivationMessage());
// prepare test authentication
SecurityContext context = new SecurityContextImpl();
List<String> values = new ArrayList<String>(1);
final String emailFromOpenId = "clerk3@localhost";
values.add(emailFromOpenId);
List<OpenIDAttribute> attributes = new ArrayList<OpenIDAttribute>();
OpenIDAuthenticationToken token = new OpenIDAuthenticationToken(null, "url", "msg", attributes);
context.setAuthentication(token);
SecurityContextHolder.setContext(context);
BusinessObjectService boSvc = mock(BusinessObjectService.class);
successHandler.setBusinessObjectService(boSvc);
assertEquals("no email attribute has been set in the token", noEmailOrTokenError, successHandler.getActivationMessage());