contextMap.put(AbstractSTSLoginModule.SHARED_TOKEN, assertionElement);
MappingProvider<Principal> mappingProvider = new STSPrincipalMappingProvider();
mappingProvider.init(contextMap);
mappingProvider.setMappingResult(mappingResult);
mappingProvider.performMapping(contextMap, null);
Principal principal = mappingResult.getMappedObject();
assertNotNull("Unexpected null mapped principal", principal);
assertEquals("Principal has unexpected value", userId, principal.getName());
}