public void testSaml2StaticEndpointClaims() throws Exception {
TokenProvider samlTokenProvider = new SAMLTokenProvider();
TokenProviderParameters providerParameters =
createProviderParameters(WSConstants.WSS_SAML2_TOKEN_TYPE, STSConstants.BEARER_KEY_KEYTYPE, null);
ClaimsManager claimsManager = new ClaimsManager();
StaticEndpointClaimsHandler claimsHandler = new StaticEndpointClaimsHandler();
// Create claims map for specific application
Map<String, String> endpointClaimsMap = new HashMap<String, String>();
endpointClaimsMap.put(CLAIM_APPLICATION.toString(), CLAIM_APPLICATION_VALUE);
Map<String, Map<String, String>> staticClaims = new HashMap<String, Map<String, String>>();
staticClaims.put(APPLICATION_APPLIES_TO, endpointClaimsMap);
claimsHandler.setEndpointClaims(staticClaims);
List<URI> supportedClaims = new ArrayList<URI>();
supportedClaims.add(CLAIM_APPLICATION);
claimsHandler.setSupportedClaims(supportedClaims);
claimsManager.setClaimHandlers(Collections.singletonList((ClaimsHandler)claimsHandler));
providerParameters.setClaimsManager(claimsManager);
ClaimCollection claims = new ClaimCollection();
Claim claim = new Claim();
claim.setClaimType(CLAIM_APPLICATION);