public void testSAML2AudienceRestrictionSeparateRestrictions() throws Exception {
SAML2CallbackHandler callbackHandler = new SAML2CallbackHandler();
callbackHandler.setStatement(SAML2CallbackHandler.Statement.AUTHN);
callbackHandler.setIssuer("www.example.com");
ConditionsBean conditions = new ConditionsBean();
conditions.setTokenPeriodMinutes(5);
List<AudienceRestrictionBean> audiencesRestrictions =
new ArrayList<AudienceRestrictionBean>();
AudienceRestrictionBean audienceRestrictionBean = new AudienceRestrictionBean();
audienceRestrictionBean.setAudienceURIs(Collections.singletonList("http://apache.org/one"));
audiencesRestrictions.add(audienceRestrictionBean);
audienceRestrictionBean = new AudienceRestrictionBean();
audienceRestrictionBean.setAudienceURIs(Collections.singletonList("http://apache.org/two"));
audiencesRestrictions.add(audienceRestrictionBean);
conditions.setAudienceRestrictions(audiencesRestrictions);
callbackHandler.setConditions(conditions);
SAMLParms samlParms = new SAMLParms();
samlParms.setCallbackHandler(callbackHandler);