TokenProvider samlTokenProvider = new SAMLTokenProvider();
TokenProviderParameters providerParameters =
createProviderParameters(WSConstants.WSS_SAML_TOKEN_TYPE, STSConstants.BEARER_KEY_KEYTYPE);
List<AttributeStatementProvider> customProviderList = new ArrayList<AttributeStatementProvider>();
customProviderList.add(new CustomAttributeProvider());
customProviderList.add(new CustomAttributeProvider());
((SAMLTokenProvider)samlTokenProvider).setAttributeStatementProviders(customProviderList);
assertTrue(samlTokenProvider.canHandleToken(WSConstants.WSS_SAML_TOKEN_TYPE));
TokenProviderResponse providerResponse = samlTokenProvider.createToken(providerParameters);
assertTrue(providerResponse != null);