map.put("costCenter", costCenter);
map.put("terribleBosses", managers);
<BUG>UserInfo info = new UserInfo(map);</BUG>
UaaAuthentication authentication = (UaaAuthentication)xoAuthAuthenticationManager.authenticate(xCodeToken);
assertEquals(map, authentication.getUserAttributes());
<BUG>assertEquals(map, authentication.getUserAttributes());
assertEquals(info, xoAuthAuthenticationManager.getUserDatabase().getUserInfo(authentication.getPrincipal().getId()));

}</BUG>
private void mockToken() throws MalformedURLException {

map.put("costCenter", costCenter);
map.put("terribleBosses", managers);
UaaAuthentication authentication = (UaaAuthentication)xoAuthAuthenticationManager.authenticate(xCodeToken);
assertEquals(map, authentication.getUserAttributes());
assertThat(authentication.getExternalGroups(), containsInAnyOrder(scopes.toArray()));
UserInfo info = new UserInfo()
.setUserAttributes(map)
.setRoles(scopes);
UserInfo actualUserInfo = xoAuthAuthenticationManager.getUserDatabase().getUserInfo(authentication.getPrincipal().getId());
assertEquals(actualUserInfo.getUserAttributes(), info.getUserAttributes());
assertThat(actualUserInfo.getRoles(), containsInAnyOrder(info.getRoles().toArray()));
}
private void mockToken() throws MalformedURLException {
