[java-identity-provider] 01/02: IDP-1121 Make tests use lists, not collections of attribute values

Rod Widdowson rdw at steadingsoftware.com
Mon Apr 22 05:04:21 EDT 2019


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch master
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=4f07b9a88c15e1ef2584111538386edd60bc2a99

commit 4f07b9a88c15e1ef2584111538386edd60bc2a99
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon Apr 22 09:41:06 2019 +0100

    IDP-1121 Make tests use lists, not collections of attribute values
    
    https://issues.shibboleth.net/jira/browse/IDP-1121
---
 .../shibboleth/idp/attribute/AttributeTest.java    | 13 +++++----
 .../resolver/AbstractResolverPluginTest.java       |  2 +-
 .../impl/SAML2NameIDAttributeDefinitionTest.java   |  2 +-
 .../dc/impl/ScriptedDataConnectorTest.java         |  3 +-
 .../resolver/impl/AttributeResolverImplTest.java   |  5 ++--
 ...ttributeSourcedSubjectCanonicalizationTest.java | 17 ++++-------
 .../ExtractUsernamePasswordFromBasicAuthTest.java  | 10 +++----
 .../idp/authn/impl/FilterFlowsByAttributeTest.java |  8 ++---
 .../impl/PopulateAttributeReleaseContextTest.java  |  2 +-
 .../idp/consent/impl/ConsentTestingSupport.java    |  4 +--
 .../impl/AttributeValueLookupFunctionTest.java     |  4 +--
 .../idp/profile/impl/ResolveAttributesTest.java    |  8 ++---
 .../impl/SAML1ByteAttributeEncoderTest.java        | 25 ++++++++--------
 .../SAML1ScopedStringAttributeEncoderTest.java     | 27 +++++++++--------
 .../impl/SAML1StringAttributeEncoderTest.java      | 23 +++++++--------
 .../impl/SAML1XMLObjectAttributeEncoderTest.java   | 27 +++++++++--------
 .../impl/SAML2ByteAttributeEncoderTest.java        | 25 ++++++++--------
 .../SAML2ScopedStringAttributeEncoderTest.java     | 29 +++++++++---------
 .../impl/SAML2StringAttributeEncoderTest.java      | 23 +++++++--------
 .../impl/SAML2XMLObjectAttributeEncoderTest.java   | 27 +++++++++--------
 ...uteSourcedSAML1NameIdentifierGeneratorTest.java | 34 +++++++++++-----------
 .../AttributeSourcedSAML2NameIDGeneratorTest.java  | 34 +++++++++++-----------
 .../impl/PersistentSAML2NameIDGeneratorTest.java   |  6 ++--
 .../nameid/impl/StoredPersistentIdDecoderTest.java |  6 ++--
 .../impl/AddAttributeStatementToAssertionTest.java |  2 +-
 .../impl/AddAttributeStatementToAssertionTest.java |  2 +-
 26 files changed, 178 insertions(+), 190 deletions(-)

diff --git a/idp-attribute-api/src/test/java/net/shibboleth/idp/attribute/AttributeTest.java b/idp-attribute-api/src/test/java/net/shibboleth/idp/attribute/AttributeTest.java
index 2c03282..8d82637 100644
--- a/idp-attribute-api/src/test/java/net/shibboleth/idp/attribute/AttributeTest.java
+++ b/idp-attribute-api/src/test/java/net/shibboleth/idp/attribute/AttributeTest.java
@@ -23,15 +23,16 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 
-import net.shibboleth.utilities.java.support.logic.ConstraintViolationException;
-
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
+import net.shibboleth.utilities.java.support.logic.ConstraintViolationException;
+
 /** Unit test for {@link IdPAttribute} class. */
 public class AttributeTest {
 
@@ -234,10 +235,10 @@ public class AttributeTest {
         attrib.setValues(null);
         Assert.assertTrue(attrib.getValues().isEmpty());
 
-        attrib.setValues(Collections.EMPTY_SET);
+        attrib.setValues(Collections.EMPTY_LIST);
         Assert.assertTrue(attrib.getValues().isEmpty());
         
-        Collection attribValues = new HashSet();
+        List attribValues = new ArrayList();
         attrib.setValues(attribValues);
         Assert.assertTrue(attrib.getValues().isEmpty());
         
@@ -306,7 +307,7 @@ public class AttributeTest {
         Assert.assertFalse(attrib.getValues().contains(value2));
 
         // test replacing all entries
-        Collection<IdPAttributeValue<?>> values = new ArrayList<>();
+        List<IdPAttributeValue<?>> values = new ArrayList<>();
         values.add(value2);
         attrib.setValues(values);
         Assert.assertFalse(attrib.getValues().isEmpty());
@@ -388,7 +389,7 @@ public class AttributeTest {
         Assert.assertTrue(attrib.compareTo(diff) > 0);
         Assert.assertEquals(attrib.compareTo(dupl) , 0);
         
-        attrib.setValues(Collections.singleton(new LocalizedStringAttributeValue("value1", null)));
+        attrib.setValues(Collections.singletonList(new LocalizedStringAttributeValue("value1", null)));
         attrib.setDisplayDescriptions(Collections.singletonMap(new Locale("en"), "Descrption"));
         attrib.setDisplayNames(Collections.singletonMap(new Locale("en"), "Name"));
         attrib.toString();
diff --git a/idp-attribute-resolver-api/src/test/java/net/shibboleth/idp/attribute/resolver/AbstractResolverPluginTest.java b/idp-attribute-resolver-api/src/test/java/net/shibboleth/idp/attribute/resolver/AbstractResolverPluginTest.java
index 380d9a4..12b68a3 100644
--- a/idp-attribute-resolver-api/src/test/java/net/shibboleth/idp/attribute/resolver/AbstractResolverPluginTest.java
+++ b/idp-attribute-resolver-api/src/test/java/net/shibboleth/idp/attribute/resolver/AbstractResolverPluginTest.java
@@ -193,7 +193,7 @@ public class AbstractResolverPluginTest {
         public MockBaseAttributeResolver(String id, String value) {
             resolverValue = new IdPAttribute(id);
             setId(id);
-            resolverValue.setValues(Collections.singleton(new StringAttributeValue(value)));
+            resolverValue.setValues(Collections.singletonList(new StringAttributeValue(value)));
         }
 
         /** {@inheritDoc} */
diff --git a/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/ad/impl/SAML2NameIDAttributeDefinitionTest.java b/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/ad/impl/SAML2NameIDAttributeDefinitionTest.java
index 04dd7ca..a037d8a 100644
--- a/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/ad/impl/SAML2NameIDAttributeDefinitionTest.java
+++ b/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/ad/impl/SAML2NameIDAttributeDefinitionTest.java
@@ -77,7 +77,7 @@ public class SAML2NameIDAttributeDefinitionTest extends OpenSAMLInitBaseTestCase
         defn.initialize();
 
         final IdPAttribute attr = new IdPAttribute("bar");
-        final Collection<? extends IdPAttributeValue<?>> values = Collections.emptyList();
+        final List<? extends IdPAttributeValue<?>> values = Collections.emptyList();
         attr.setValues(values);
 
         final StaticAttributeDefinition sa = new StaticAttributeDefinition();
diff --git a/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/dc/impl/ScriptedDataConnectorTest.java b/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/dc/impl/ScriptedDataConnectorTest.java
index 15a21c9..74015a1 100644
--- a/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/dc/impl/ScriptedDataConnectorTest.java
+++ b/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/dc/impl/ScriptedDataConnectorTest.java
@@ -21,7 +21,6 @@ import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertTrue;
 
 import java.io.IOException;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
@@ -134,7 +133,7 @@ public class ScriptedDataConnectorTest {
         connector.setId("Scripted");
         
         final IdPAttribute attribute = new IdPAttribute("attr");
-        attribute.setValues((Collection)Collections.singleton((IdPAttributeValue)new StringAttributeValue("bar")));
+        attribute.setValues(Collections.singletonList((IdPAttributeValue<?>)new StringAttributeValue("bar")));
         connector.setCustomObject(attribute);
         
         final EvaluableScript definitionScript = new EvaluableScript("javascript", getScript("custom.js"));
diff --git a/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/impl/AttributeResolverImplTest.java b/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/impl/AttributeResolverImplTest.java
index 79a6440..aed89af 100644
--- a/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/impl/AttributeResolverImplTest.java
+++ b/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/impl/AttributeResolverImplTest.java
@@ -30,6 +30,7 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Map;
 
 import javax.annotation.Nonnull;
@@ -328,7 +329,7 @@ public class AttributeResolverImplTest {
     @Test(enabled=true) public void resolveWithTimeout() throws Exception {
         
         final IdPAttribute i1Val = new IdPAttribute("Atr");
-        i1Val.setValues(Collections.singleton(new StringAttributeValue("value1")));
+        i1Val.setValues(Collections.singletonList(new StringAttributeValue("value1")));
         
         final MockDataConnector dc1 = new MockDataConnector("dc1", Collections.singletonMap("Atr", i1Val));
         final SimpleAttributeDefinition ad = new SimpleAttributeDefinition();
@@ -338,7 +339,7 @@ public class AttributeResolverImplTest {
         ad.initialize();
         
         final IdPAttribute i2Val = new IdPAttribute("Atr");
-        final HashSet<IdPAttributeValue<?>>vals = new HashSet<>();
+        final List<IdPAttributeValue<?>>vals = new ArrayList<>();
         vals.add(new StringAttributeValue("value1"));
         vals.add(new StringAttributeValue("value2"));
         i2Val.setValues(vals);
diff --git a/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/AttributeSourcedSubjectCanonicalizationTest.java b/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/AttributeSourcedSubjectCanonicalizationTest.java
index 9681725..11efba8 100644
--- a/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/AttributeSourcedSubjectCanonicalizationTest.java
+++ b/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/AttributeSourcedSubjectCanonicalizationTest.java
@@ -18,13 +18,16 @@
 package net.shibboleth.idp.authn.impl;
 
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.Collections;
 
 import javax.security.auth.Subject;
 
+import org.springframework.webflow.execution.Event;
+import org.testng.Assert;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
 import net.shibboleth.idp.attribute.IdPAttribute;
-import net.shibboleth.idp.attribute.IdPAttributeValue;
 import net.shibboleth.idp.attribute.StringAttributeValue;
 import net.shibboleth.idp.attribute.context.AttributeContext;
 import net.shibboleth.idp.authn.AuthnEventIds;
@@ -32,11 +35,6 @@ import net.shibboleth.idp.authn.context.SubjectCanonicalizationContext;
 import net.shibboleth.idp.profile.ActionTestingSupport;
 import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
 
-import org.springframework.webflow.execution.Event;
-import org.testng.Assert;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
 /** {@link AttributeSourcedSubjectCanonicalization} unit test. */
 public class AttributeSourcedSubjectCanonicalizationTest extends BaseAuthenticationContextTest {
     
@@ -74,11 +72,8 @@ public class AttributeSourcedSubjectCanonicalizationTest extends BaseAuthenticat
     }
 
     @Test public void testSuccess() {
-        final Collection<? extends IdPAttributeValue<?>> values =
-                Collections.singletonList(new StringAttributeValue("foo"));
-
         final IdPAttribute inputAttribute = new IdPAttribute("attr2");
-        inputAttribute.setValues(values);
+        inputAttribute.setValues(Collections.singletonList(new StringAttributeValue("foo")));
         final SubjectCanonicalizationContext sc = prc.getSubcontext(SubjectCanonicalizationContext.class, true);
         sc.setSubject(new Subject());
         sc.getSubcontext(AttributeContext.class, true).setIdPAttributes(Collections.singleton(inputAttribute));
diff --git a/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/ExtractUsernamePasswordFromBasicAuthTest.java b/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/ExtractUsernamePasswordFromBasicAuthTest.java
index 626f924..98b6a13 100644
--- a/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/ExtractUsernamePasswordFromBasicAuthTest.java
+++ b/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/ExtractUsernamePasswordFromBasicAuthTest.java
@@ -18,11 +18,6 @@
 package net.shibboleth.idp.authn.impl;
 
 
-import net.shibboleth.idp.authn.AuthnEventIds;
-import net.shibboleth.idp.authn.context.AuthenticationContext;
-import net.shibboleth.idp.authn.context.UsernamePasswordContext;
-import net.shibboleth.idp.profile.ActionTestingSupport;
-
 import org.springframework.mock.web.MockHttpServletRequest;
 import org.springframework.webflow.execution.Event;
 import org.testng.Assert;
@@ -31,6 +26,11 @@ import org.testng.annotations.Test;
 
 import com.google.common.net.HttpHeaders;
 
+import net.shibboleth.idp.authn.AuthnEventIds;
+import net.shibboleth.idp.authn.context.AuthenticationContext;
+import net.shibboleth.idp.authn.context.UsernamePasswordContext;
+import net.shibboleth.idp.profile.ActionTestingSupport;
+
 /** {@link ExtractUsernamePasswordFromBasicAuth} unit test. */
 public class ExtractUsernamePasswordFromBasicAuthTest extends BaseAuthenticationContextTest {
     
diff --git a/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/FilterFlowsByAttributeTest.java b/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/FilterFlowsByAttributeTest.java
index 9402e62..523f4c0 100644
--- a/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/FilterFlowsByAttributeTest.java
+++ b/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/FilterFlowsByAttributeTest.java
@@ -86,7 +86,7 @@ public class FilterFlowsByAttributeTest extends BaseAuthenticationContextTest {
         final AuthenticationContext authCtx = prc.getSubcontext(AuthenticationContext.class);
         final IdPAttribute attr = new IdPAttribute("foo");
         authCtx.getSubcontext(AttributeContext.class, true).setIdPAttributes(Collections.singletonList(attr));
-        attr.setValues(Collections.singleton(new StringAttributeValue("bar")));
+        attr.setValues(Collections.singletonList(new StringAttributeValue("bar")));
         
         action.setFilterActiveResults(false);
         action.initialize();
@@ -100,7 +100,7 @@ public class FilterFlowsByAttributeTest extends BaseAuthenticationContextTest {
         final AuthenticationContext authCtx = prc.getSubcontext(AuthenticationContext.class);
         final IdPAttribute attr = new IdPAttribute("foo");
         authCtx.getSubcontext(AttributeContext.class, true).setIdPAttributes(Collections.singletonList(attr));
-        attr.setValues(Collections.singleton(new StringAttributeValue("bar")));
+        attr.setValues(Collections.singletonList(new StringAttributeValue("bar")));
         
         authCtx.getPotentialFlows().get("test1").getSupportedPrincipals().add(new TestPrincipal("baz"));
         authCtx.getPotentialFlows().get("test2").getSupportedPrincipals().add(new TestPrincipal("bar"));
@@ -119,7 +119,7 @@ public class FilterFlowsByAttributeTest extends BaseAuthenticationContextTest {
         final AuthenticationContext authCtx = prc.getSubcontext(AuthenticationContext.class);
         final IdPAttribute attr = new IdPAttribute("foo");
         authCtx.getSubcontext(AttributeContext.class, true).setIdPAttributes(Collections.singletonList(attr));
-        attr.setValues(Collections.singleton(new StringAttributeValue("test3")));
+        attr.setValues(Collections.singletonList(new StringAttributeValue("test3")));
         
         action.initialize();
         final Event event = action.execute(src);
@@ -132,7 +132,7 @@ public class FilterFlowsByAttributeTest extends BaseAuthenticationContextTest {
         final AuthenticationContext authCtx = prc.getSubcontext(AuthenticationContext.class);
         final IdPAttribute attr = new IdPAttribute("foo");
         authCtx.getSubcontext(AttributeContext.class, true).setIdPAttributes(Collections.singletonList(attr));
-        attr.setValues(Collections.singleton(new StringAttributeValue("test2")));
+        attr.setValues(Collections.singletonList(new StringAttributeValue("test2")));
         
         action.initialize();
         final Event event = action.execute(src);
diff --git a/idp-consent-impl/src/test/java/net/shibboleth/idp/consent/flow/ar/impl/PopulateAttributeReleaseContextTest.java b/idp-consent-impl/src/test/java/net/shibboleth/idp/consent/flow/ar/impl/PopulateAttributeReleaseContextTest.java
index 3006452..3a8ae20 100644
--- a/idp-consent-impl/src/test/java/net/shibboleth/idp/consent/flow/ar/impl/PopulateAttributeReleaseContextTest.java
+++ b/idp-consent-impl/src/test/java/net/shibboleth/idp/consent/flow/ar/impl/PopulateAttributeReleaseContextTest.java
@@ -131,7 +131,7 @@ public class PopulateAttributeReleaseContextTest extends AbstractAttributeReleas
         final List<String> attributeOrder = Arrays.asList("attribute3", "attribute2");
 
         final IdPAttribute attribute4 = new IdPAttribute("attribute4");
-        attribute4.setValues(Collections.singleton(new StringAttributeValue("value4")));
+        attribute4.setValues(Collections.singletonList(new StringAttributeValue("value4")));
 
         final Map<String, IdPAttribute> orderedAttributes = new LinkedHashMap<>();
         orderedAttributes.put("attribute3", ConsentTestingSupport.newAttributeMap().get("attribute3"));
diff --git a/idp-consent-impl/src/test/java/net/shibboleth/idp/consent/impl/ConsentTestingSupport.java b/idp-consent-impl/src/test/java/net/shibboleth/idp/consent/impl/ConsentTestingSupport.java
index bf744f2..ac5a65d 100644
--- a/idp-consent-impl/src/test/java/net/shibboleth/idp/consent/impl/ConsentTestingSupport.java
+++ b/idp-consent-impl/src/test/java/net/shibboleth/idp/consent/impl/ConsentTestingSupport.java
@@ -56,13 +56,13 @@ public class ConsentTestingSupport {
         final IdPAttributeValue<?> value3 = new StringAttributeValue("value3");
 
         final IdPAttribute attribute1 = new IdPAttribute("attribute1");
-        attribute1.setValues(Collections.singleton(value1));
+        attribute1.setValues(Collections.singletonList(value1));
 
         final IdPAttribute attribute2 = new IdPAttribute("attribute2");
         attribute2.setValues(Arrays.asList(value1, value2));
 
         final IdPAttribute attribute3 = new IdPAttribute("attribute3");
-        attribute3.setValues(Collections.singleton(value3));
+        attribute3.setValues(Collections.singletonList(value3));
 
         final Map<String, IdPAttribute> map = new HashMap<>();
         map.put(attribute1.getId(), attribute1);
diff --git a/idp-consent-impl/src/test/java/net/shibboleth/idp/consent/logic/impl/AttributeValueLookupFunctionTest.java b/idp-consent-impl/src/test/java/net/shibboleth/idp/consent/logic/impl/AttributeValueLookupFunctionTest.java
index 2242443..5c48016 100644
--- a/idp-consent-impl/src/test/java/net/shibboleth/idp/consent/logic/impl/AttributeValueLookupFunctionTest.java
+++ b/idp-consent-impl/src/test/java/net/shibboleth/idp/consent/logic/impl/AttributeValueLookupFunctionTest.java
@@ -56,7 +56,7 @@ public class AttributeValueLookupFunctionTest {
         
         final Map<String, IdPAttribute> unfilteredAttributes = ConsentTestingSupport.newAttributeMap();
         final IdPAttribute attribute4 = new IdPAttribute("attribute4");
-        attribute4.setValues(Collections.singleton(new StringAttributeValue("value4")));
+        attribute4.setValues(Collections.singletonList(new StringAttributeValue("value4")));
         unfilteredAttributes.put(attribute4.getId(), attribute4);
         attributeCtx.setUnfilteredIdPAttributes(unfilteredAttributes.values());
         
@@ -101,7 +101,7 @@ public class AttributeValueLookupFunctionTest {
         byte[] data = {1, 2, 3, 0xF};
 
         final IdPAttribute byteAttribute = new IdPAttribute("ByteAttribute");
-        byteAttribute.setValues(Collections.singleton(new ByteAttributeValue(data)));
+        byteAttribute.setValues(Collections.singletonList(new ByteAttributeValue(data)));
 
         final AttributeContext attributeCtx =
                 prc.getSubcontext(RelyingPartyContext.class, true).getSubcontext(AttributeContext.class);
diff --git a/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/ResolveAttributesTest.java b/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/ResolveAttributesTest.java
index 7d88285..bed053e 100644
--- a/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/ResolveAttributesTest.java
+++ b/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/ResolveAttributesTest.java
@@ -67,7 +67,7 @@ public class ResolveAttributesTest {
         prc.getSubcontext(SubjectContext.class, true);
 
         final IdPAttribute attribute = new IdPAttribute("ad1");
-        attribute.setValues(Collections.singleton(new StringAttributeValue("value1")));
+        attribute.setValues(Collections.singletonList(new StringAttributeValue("value1")));
 
         final LazySet<AttributeDefinition> definitions = new LazySet<>();
         final AttributeDefinition ad1 = new MockAttributeDefinition("ad1", attribute);
@@ -101,7 +101,7 @@ public class ResolveAttributesTest {
         prc.getSubcontext(SubjectContext.class, true);
 
         final IdPAttribute attribute = new IdPAttribute("ad1");
-        attribute.setValues(Collections.singleton(new StringAttributeValue("value1")));
+        attribute.setValues(Collections.singletonList(new StringAttributeValue("value1")));
 
         final LazySet<AttributeDefinition> definitions = new LazySet<>();
         final AttributeDefinition ad1 = new MockAttributeDefinition("ad1", attribute);
@@ -160,7 +160,7 @@ public class ResolveAttributesTest {
         prc.getSubcontext(SubjectContext.class, true);
 
         final IdPAttribute attribute = new IdPAttribute("ad1");
-        attribute.setValues(Collections.singleton(new StringAttributeValue("value1")));
+        attribute.setValues(Collections.singletonList(new StringAttributeValue("value1")));
 
         final LazySet<AttributeDefinition> definitions = new LazySet<>();
         final AttributeDefinition ad1 = new MockAttributeDefinition("ad1", new ResolutionException());
@@ -185,7 +185,7 @@ public class ResolveAttributesTest {
         prc.getSubcontext(SubjectContext.class, true);
 
         final IdPAttribute attribute = new IdPAttribute("ad1");
-        attribute.setValues(Collections.singleton(new StringAttributeValue("value1")));
+        attribute.setValues(Collections.singletonList(new StringAttributeValue("value1")));
 
         final LazySet<AttributeDefinition> definitions = new LazySet<>();
         definitions.add(new MockAttributeDefinition("ad1", new ResolutionException()));
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1ByteAttributeEncoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1ByteAttributeEncoderTest.java
index 47858d4..4dd6c42 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1ByteAttributeEncoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1ByteAttributeEncoderTest.java
@@ -18,18 +18,8 @@
 package net.shibboleth.idp.saml.attribute.encoding.impl;
 
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.List;
 
-import net.shibboleth.idp.attribute.AttributeEncodingException;
-import net.shibboleth.idp.attribute.ByteAttributeValue;
-import net.shibboleth.idp.attribute.IdPAttribute;
-import net.shibboleth.idp.attribute.IdPAttributeValue;
-import net.shibboleth.idp.attribute.ScopedStringAttributeValue;
-import net.shibboleth.idp.attribute.StringAttributeValue;
-import net.shibboleth.utilities.java.support.codec.Base64Support;
-import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
-
 import org.opensaml.core.OpenSAMLInitBaseTestCase;
 import org.opensaml.core.xml.XMLObject;
 import org.opensaml.core.xml.schema.XSBase64Binary;
@@ -39,6 +29,15 @@ import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
+import net.shibboleth.idp.attribute.AttributeEncodingException;
+import net.shibboleth.idp.attribute.ByteAttributeValue;
+import net.shibboleth.idp.attribute.IdPAttribute;
+import net.shibboleth.idp.attribute.IdPAttributeValue;
+import net.shibboleth.idp.attribute.ScopedStringAttributeValue;
+import net.shibboleth.idp.attribute.StringAttributeValue;
+import net.shibboleth.utilities.java.support.codec.Base64Support;
+import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
+
 /**
  * {@link SAML1ByteAttributeEncoder} Unit test.
  * 
@@ -75,7 +74,7 @@ public class SAML1ByteAttributeEncoderTest extends OpenSAMLInitBaseTestCase {
 
     @Test(expectedExceptions = {AttributeEncodingException.class,}) public void inappropriate() throws Exception {
         final int[] intArray = {1, 2, 3, 4};
-        final Collection<IdPAttributeValue<?>> values =
+        final List<IdPAttributeValue<?>> values =
                 Arrays.asList(new StringAttributeValue("foo"), new ScopedStringAttributeValue(
                         "foo", "bar"), new IdPAttributeValue<Object>() {
                     public Object getValue() {
@@ -94,7 +93,7 @@ public class SAML1ByteAttributeEncoderTest extends OpenSAMLInitBaseTestCase {
     }
 
     @Test public void single() throws Exception {
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(new StringAttributeValue("foo"), new ByteAttributeValue(BYTE_ARRAY_1));
         final IdPAttribute inputAttribute;
 
@@ -122,7 +121,7 @@ public class SAML1ByteAttributeEncoderTest extends OpenSAMLInitBaseTestCase {
     }
 
     @Test public void multi() throws Exception {
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(BYTE_ARRAY_1), new ByteAttributeValue(
                         BYTE_ARRAY_2));
 
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1ScopedStringAttributeEncoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1ScopedStringAttributeEncoderTest.java
index 7ae06cf..210c77d 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1ScopedStringAttributeEncoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1ScopedStringAttributeEncoderTest.java
@@ -18,9 +18,16 @@
 package net.shibboleth.idp.saml.attribute.encoding.impl;
 
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.List;
 
+import org.opensaml.core.OpenSAMLInitBaseTestCase;
+import org.opensaml.core.xml.XMLObject;
+import org.opensaml.core.xml.schema.XSString;
+import org.opensaml.saml.saml1.core.Attribute;
+import org.opensaml.saml.saml1.core.AttributeValue;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
 import net.shibboleth.idp.attribute.AttributeEncodingException;
 import net.shibboleth.idp.attribute.ByteAttributeValue;
 import net.shibboleth.idp.attribute.IdPAttribute;
@@ -31,14 +38,6 @@ import net.shibboleth.idp.saml.xmlobject.ScopedValue;
 import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
 import net.shibboleth.utilities.java.support.component.UninitializedComponentException;
 
-import org.opensaml.core.OpenSAMLInitBaseTestCase;
-import org.opensaml.core.xml.XMLObject;
-import org.opensaml.core.xml.schema.XSString;
-import org.opensaml.saml.saml1.core.Attribute;
-import org.opensaml.saml.saml1.core.AttributeValue;
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
 /**
  * {@link SAML1ScopedStringAttributeEncoder} Unit test.
  */
@@ -91,7 +90,7 @@ public class SAML1ScopedStringAttributeEncoderTest extends OpenSAMLInitBaseTestC
             throws AttributeEncodingException, ComponentInitializationException {
         final SAML1ScopedStringAttributeEncoder encoder = makeEncoder();
         final int[] intArray = {1, 2, 3, 4};
-        final Collection<IdPAttributeValue<?>> values =
+        final List<IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new StringAttributeValue("dd"),
                         new IdPAttributeValue<Object>() {
                             @Override
@@ -129,7 +128,7 @@ public class SAML1ScopedStringAttributeEncoderTest extends OpenSAMLInitBaseTestC
         encoder.setScopeAttributeName(ATTRIBUTE_NAME);
         encoder.setScopeDelimiter(DELIMITER);
 
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), value1);
 
         final IdPAttribute inputAttribute;
@@ -162,7 +161,7 @@ public class SAML1ScopedStringAttributeEncoderTest extends OpenSAMLInitBaseTestC
     @Test public void multi() throws ComponentInitializationException, AttributeEncodingException {
         final SAML1ScopedStringAttributeEncoder encoder = makeEncoder();
         encoder.initialize();
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), value1, value2);
 
         final IdPAttribute inputAttribute;
@@ -218,7 +217,7 @@ public class SAML1ScopedStringAttributeEncoderTest extends OpenSAMLInitBaseTestC
         encoder.setScopeDelimiter(DELIMITER);
         encoder.initialize();
 
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), value1);
 
         final IdPAttribute inputAttribute;
@@ -251,7 +250,7 @@ public class SAML1ScopedStringAttributeEncoderTest extends OpenSAMLInitBaseTestC
         encoder.setScopeDelimiter(DELIMITER);
         encoder.setScopeAttributeName(null);
         encoder.initialize();
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), value1, value2);
 
         final IdPAttribute inputAttribute;
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1StringAttributeEncoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1StringAttributeEncoderTest.java
index 35169ae..b30c595 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1StringAttributeEncoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1StringAttributeEncoderTest.java
@@ -18,17 +18,8 @@
 package net.shibboleth.idp.saml.attribute.encoding.impl;
 
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.List;
 
-import net.shibboleth.idp.attribute.AttributeEncodingException;
-import net.shibboleth.idp.attribute.ByteAttributeValue;
-import net.shibboleth.idp.attribute.IdPAttribute;
-import net.shibboleth.idp.attribute.IdPAttributeValue;
-import net.shibboleth.idp.attribute.ScopedStringAttributeValue;
-import net.shibboleth.idp.attribute.StringAttributeValue;
-import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
-
 import org.opensaml.core.OpenSAMLInitBaseTestCase;
 import org.opensaml.core.xml.XMLObject;
 import org.opensaml.core.xml.schema.XSString;
@@ -38,6 +29,14 @@ import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
+import net.shibboleth.idp.attribute.AttributeEncodingException;
+import net.shibboleth.idp.attribute.ByteAttributeValue;
+import net.shibboleth.idp.attribute.IdPAttribute;
+import net.shibboleth.idp.attribute.IdPAttributeValue;
+import net.shibboleth.idp.attribute.ScopedStringAttributeValue;
+import net.shibboleth.idp.attribute.StringAttributeValue;
+import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
+
 /**
  * {@link SAML1StringAttributeEncoder} Unit test.
  */
@@ -71,7 +70,7 @@ public class SAML1StringAttributeEncoderTest extends OpenSAMLInitBaseTestCase {
     @Test(expectedExceptions = {AttributeEncodingException.class,}) public void inappropriate() throws Exception {
         encoder.initialize();
         final int[] intArray = {1, 2, 3, 4};
-        final Collection<IdPAttributeValue<?>> values =
+        final List<IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}),
                         new IdPAttributeValue<Object>() {
                             @Override
@@ -92,7 +91,7 @@ public class SAML1StringAttributeEncoderTest extends OpenSAMLInitBaseTestCase {
     }
 
     @Test public void single() throws Exception {
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new StringAttributeValue(STRING_1));
 
         final IdPAttribute inputAttribute;
@@ -120,7 +119,7 @@ public class SAML1StringAttributeEncoderTest extends OpenSAMLInitBaseTestCase {
     }
 
     @Test public void multi() throws Exception {
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}),
                         new StringAttributeValue(STRING_1),
                         new StringAttributeValue(STRING_2),
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1XMLObjectAttributeEncoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1XMLObjectAttributeEncoderTest.java
index 390e1f1..2fc8e5f 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1XMLObjectAttributeEncoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1XMLObjectAttributeEncoderTest.java
@@ -18,19 +18,9 @@
 package net.shibboleth.idp.saml.attribute.encoding.impl;
 
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 
-import net.shibboleth.idp.attribute.AttributeEncodingException;
-import net.shibboleth.idp.attribute.ByteAttributeValue;
-import net.shibboleth.idp.attribute.IdPAttribute;
-import net.shibboleth.idp.attribute.IdPAttributeValue;
-import net.shibboleth.idp.attribute.ScopedStringAttributeValue;
-import net.shibboleth.idp.attribute.StringAttributeValue;
-import net.shibboleth.idp.attribute.XMLObjectAttributeValue;
-import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
-
 import org.opensaml.core.OpenSAMLInitBaseTestCase;
 import org.opensaml.core.xml.XMLObject;
 import org.opensaml.core.xml.schema.XSString;
@@ -40,6 +30,15 @@ import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
+import net.shibboleth.idp.attribute.AttributeEncodingException;
+import net.shibboleth.idp.attribute.ByteAttributeValue;
+import net.shibboleth.idp.attribute.IdPAttribute;
+import net.shibboleth.idp.attribute.IdPAttributeValue;
+import net.shibboleth.idp.attribute.ScopedStringAttributeValue;
+import net.shibboleth.idp.attribute.StringAttributeValue;
+import net.shibboleth.idp.attribute.XMLObjectAttributeValue;
+import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
+
 /**
  * {@link SAML1XMLObjectAttributeEncoder} Unit test.
  * 
@@ -81,7 +80,7 @@ public class SAML1XMLObjectAttributeEncoderTest extends OpenSAMLInitBaseTestCase
      */
     private XMLObjectAttributeValue ObjectFor(final String value) {
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
-        inputAttribute.setValues(Collections.singleton(new StringAttributeValue(value)));
+        inputAttribute.setValues(Collections.singletonList(new StringAttributeValue(value)));
         try {
             return new XMLObjectAttributeValue(strEncoder.encode(inputAttribute));
         } catch (AttributeEncodingException e) {
@@ -121,7 +120,7 @@ public class SAML1XMLObjectAttributeEncoderTest extends OpenSAMLInitBaseTestCase
 
     @Test(expectedExceptions = {AttributeEncodingException.class,}) public void inappropriate() throws Exception {
         final int[] intArray = {1, 2, 3, 4};
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}),
                         new ScopedStringAttributeValue("foo", "bar"), new IdPAttributeValue<Object>() {
                             @Override
@@ -140,7 +139,7 @@ public class SAML1XMLObjectAttributeEncoderTest extends OpenSAMLInitBaseTestCase
     }
 
     @Test public void single() throws Exception {
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), ObjectFor(STRING_1));
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
@@ -161,7 +160,7 @@ public class SAML1XMLObjectAttributeEncoderTest extends OpenSAMLInitBaseTestCase
     }
 
     @Test public void testMulti() throws Exception {
-        final Collection<? extends IdPAttributeValue<?>> values = Arrays.asList(ObjectFor(STRING_1), ObjectFor(STRING_2));
+        final List<? extends IdPAttributeValue<?>> values = Arrays.asList(ObjectFor(STRING_1), ObjectFor(STRING_2));
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
         inputAttribute.setValues(values);
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2ByteAttributeEncoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2ByteAttributeEncoderTest.java
index 16bc62e..b871856 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2ByteAttributeEncoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2ByteAttributeEncoderTest.java
@@ -18,18 +18,8 @@
 package net.shibboleth.idp.saml.attribute.encoding.impl;
 
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.List;
 
-import net.shibboleth.idp.attribute.AttributeEncodingException;
-import net.shibboleth.idp.attribute.ByteAttributeValue;
-import net.shibboleth.idp.attribute.IdPAttribute;
-import net.shibboleth.idp.attribute.IdPAttributeValue;
-import net.shibboleth.idp.attribute.ScopedStringAttributeValue;
-import net.shibboleth.idp.attribute.StringAttributeValue;
-import net.shibboleth.utilities.java.support.codec.Base64Support;
-import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
-
 import org.opensaml.core.OpenSAMLInitBaseTestCase;
 import org.opensaml.core.xml.XMLObject;
 import org.opensaml.core.xml.schema.XSBase64Binary;
@@ -39,6 +29,15 @@ import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
+import net.shibboleth.idp.attribute.AttributeEncodingException;
+import net.shibboleth.idp.attribute.ByteAttributeValue;
+import net.shibboleth.idp.attribute.IdPAttribute;
+import net.shibboleth.idp.attribute.IdPAttributeValue;
+import net.shibboleth.idp.attribute.ScopedStringAttributeValue;
+import net.shibboleth.idp.attribute.StringAttributeValue;
+import net.shibboleth.utilities.java.support.codec.Base64Support;
+import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
+
 /**
  * {@link SAML2ByteAttributeEncoder} Unit test.
  * 
@@ -74,7 +73,7 @@ public class SAML2ByteAttributeEncoderTest extends OpenSAMLInitBaseTestCase {
 
     @Test(expectedExceptions = {AttributeEncodingException.class,}) public void inappropriate() throws Exception {
         final int[] intArray = {1, 2, 3, 4};
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(new StringAttributeValue("foo"), new ScopedStringAttributeValue("foo", "bar"),
                         new IdPAttributeValue<Object>() {
                             public Object getValue() {
@@ -91,7 +90,7 @@ public class SAML2ByteAttributeEncoderTest extends OpenSAMLInitBaseTestCase {
     }
 
     @Test public void single() throws Exception {
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(new StringAttributeValue("foo"), new ByteAttributeValue(BYTE_ARRAY_1));
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
         inputAttribute.setValues(values);
@@ -117,7 +116,7 @@ public class SAML2ByteAttributeEncoderTest extends OpenSAMLInitBaseTestCase {
     }
 
     @Test public void multi() throws Exception {
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(BYTE_ARRAY_1), new ByteAttributeValue(BYTE_ARRAY_2));
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2ScopedStringAttributeEncoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2ScopedStringAttributeEncoderTest.java
index a49750c..3671188 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2ScopedStringAttributeEncoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2ScopedStringAttributeEncoderTest.java
@@ -18,27 +18,26 @@
 package net.shibboleth.idp.saml.attribute.encoding.impl;
 
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.List;
 
+import org.opensaml.core.OpenSAMLInitBaseTestCase;
+import org.opensaml.core.xml.XMLObject;
+import org.opensaml.core.xml.schema.XSString;
+import org.opensaml.saml.saml2.core.Attribute;
+import org.opensaml.saml.saml2.core.AttributeValue;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
 import net.shibboleth.idp.attribute.AttributeEncodingException;
-import net.shibboleth.idp.attribute.IdPAttributeValue;
 import net.shibboleth.idp.attribute.ByteAttributeValue;
 import net.shibboleth.idp.attribute.IdPAttribute;
+import net.shibboleth.idp.attribute.IdPAttributeValue;
 import net.shibboleth.idp.attribute.ScopedStringAttributeValue;
 import net.shibboleth.idp.attribute.StringAttributeValue;
 import net.shibboleth.idp.saml.xmlobject.ScopedValue;
 import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
 import net.shibboleth.utilities.java.support.component.UninitializedComponentException;
 
-import org.opensaml.core.OpenSAMLInitBaseTestCase;
-import org.opensaml.core.xml.XMLObject;
-import org.opensaml.core.xml.schema.XSString;
-import org.opensaml.saml.saml2.core.Attribute;
-import org.opensaml.saml.saml2.core.AttributeValue;
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
 /**
  * {@link SAML2ScopedStringAttributeEncoder} Unit test. Looks a lot like the SAML1 one
  */
@@ -92,7 +91,7 @@ public class SAML2ScopedStringAttributeEncoderTest extends OpenSAMLInitBaseTestC
             throws AttributeEncodingException, ComponentInitializationException {
         final SAML2ScopedStringAttributeEncoder encoder = makeEncoder();
         final int[] intArray = {1, 2, 3, 4};
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new StringAttributeValue("dd"),
                         new IdPAttributeValue<Object>() {
                             public Object getValue() {
@@ -129,7 +128,7 @@ public class SAML2ScopedStringAttributeEncoderTest extends OpenSAMLInitBaseTestC
         encoder.setScopeAttributeName(ATTRIBUTE_NAME);
         encoder.setScopeDelimiter(DELIMITER);
 
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), value1);
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
@@ -163,7 +162,7 @@ public class SAML2ScopedStringAttributeEncoderTest extends OpenSAMLInitBaseTestC
         encoder.setScopeType("attribute");
         encoder.setScopeAttributeName(ATTR_NAME);
         encoder.initialize();
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), value1, value2);
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
@@ -225,7 +224,7 @@ public class SAML2ScopedStringAttributeEncoderTest extends OpenSAMLInitBaseTestC
         encoder.setScopeDelimiter(DELIMITER);
         encoder.initialize();
 
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), value1);
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
@@ -256,7 +255,7 @@ public class SAML2ScopedStringAttributeEncoderTest extends OpenSAMLInitBaseTestC
         encoder.setScopeDelimiter(DELIMITER);
         encoder.setScopeAttributeName(null);
         encoder.initialize();
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), value1, value2);
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2StringAttributeEncoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2StringAttributeEncoderTest.java
index 390ef59..da888ce 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2StringAttributeEncoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2StringAttributeEncoderTest.java
@@ -18,17 +18,8 @@
 package net.shibboleth.idp.saml.attribute.encoding.impl;
 
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.List;
 
-import net.shibboleth.idp.attribute.AttributeEncodingException;
-import net.shibboleth.idp.attribute.ByteAttributeValue;
-import net.shibboleth.idp.attribute.IdPAttribute;
-import net.shibboleth.idp.attribute.IdPAttributeValue;
-import net.shibboleth.idp.attribute.ScopedStringAttributeValue;
-import net.shibboleth.idp.attribute.StringAttributeValue;
-import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
-
 import org.opensaml.core.OpenSAMLInitBaseTestCase;
 import org.opensaml.core.xml.XMLObject;
 import org.opensaml.core.xml.schema.XSString;
@@ -38,6 +29,14 @@ import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
+import net.shibboleth.idp.attribute.AttributeEncodingException;
+import net.shibboleth.idp.attribute.ByteAttributeValue;
+import net.shibboleth.idp.attribute.IdPAttribute;
+import net.shibboleth.idp.attribute.IdPAttributeValue;
+import net.shibboleth.idp.attribute.ScopedStringAttributeValue;
+import net.shibboleth.idp.attribute.StringAttributeValue;
+import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
+
 /**
  * {@link SAML2StringAttributeEncoder} Unit test.
  * 
@@ -73,7 +72,7 @@ public class SAML2StringAttributeEncoderTest extends OpenSAMLInitBaseTestCase {
 
     @Test(expectedExceptions = {AttributeEncodingException.class,}) public void inappropriate() throws Exception {
         final int[] intArray = {1, 2, 3, 4};
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new IdPAttributeValue<Object>() {
                     @Override
                     public Object getValue() {
@@ -92,7 +91,7 @@ public class SAML2StringAttributeEncoderTest extends OpenSAMLInitBaseTestCase {
     }
 
     @Test public void single() throws Exception {
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new StringAttributeValue(STRING_1));
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
@@ -119,7 +118,7 @@ public class SAML2StringAttributeEncoderTest extends OpenSAMLInitBaseTestCase {
     }
 
     @Test public void multi() throws Exception {
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}),
                         new StringAttributeValue(STRING_1),
                         new StringAttributeValue(STRING_2),
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2XMLObjectAttributeEncoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2XMLObjectAttributeEncoderTest.java
index 731384b..87322fc 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2XMLObjectAttributeEncoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2XMLObjectAttributeEncoderTest.java
@@ -18,19 +18,9 @@
 package net.shibboleth.idp.saml.attribute.encoding.impl;
 
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 
-import net.shibboleth.idp.attribute.AttributeEncodingException;
-import net.shibboleth.idp.attribute.ByteAttributeValue;
-import net.shibboleth.idp.attribute.IdPAttribute;
-import net.shibboleth.idp.attribute.IdPAttributeValue;
-import net.shibboleth.idp.attribute.ScopedStringAttributeValue;
-import net.shibboleth.idp.attribute.StringAttributeValue;
-import net.shibboleth.idp.attribute.XMLObjectAttributeValue;
-import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
-
 import org.opensaml.core.OpenSAMLInitBaseTestCase;
 import org.opensaml.core.xml.XMLObject;
 import org.opensaml.core.xml.schema.XSString;
@@ -40,6 +30,15 @@ import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
+import net.shibboleth.idp.attribute.AttributeEncodingException;
+import net.shibboleth.idp.attribute.ByteAttributeValue;
+import net.shibboleth.idp.attribute.IdPAttribute;
+import net.shibboleth.idp.attribute.IdPAttributeValue;
+import net.shibboleth.idp.attribute.ScopedStringAttributeValue;
+import net.shibboleth.idp.attribute.StringAttributeValue;
+import net.shibboleth.idp.attribute.XMLObjectAttributeValue;
+import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
+
 /**
  * {@link SAML2XMLObjectAttributeEncoder} Unit test.
  * 
@@ -83,7 +82,7 @@ public class SAML2XMLObjectAttributeEncoderTest extends OpenSAMLInitBaseTestCase
      */
     private XMLObjectAttributeValue ObjectFor(final String value) {
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
-        inputAttribute.setValues(Collections.singleton(new StringAttributeValue(value)));
+        inputAttribute.setValues(Collections.singletonList(new StringAttributeValue(value)));
         try {
             return new XMLObjectAttributeValue(strEncoder.encode(inputAttribute));
         } catch (AttributeEncodingException e) {
@@ -122,7 +121,7 @@ public class SAML2XMLObjectAttributeEncoderTest extends OpenSAMLInitBaseTestCase
 
     @Test(expectedExceptions = {AttributeEncodingException.class,}) public void inappropriate() throws Exception {
         final int[] intArray = {1, 2, 3, 4};
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new ScopedStringAttributeValue("foo",
                         "bar"), new IdPAttributeValue<Object>() {
                     @Override
@@ -141,7 +140,7 @@ public class SAML2XMLObjectAttributeEncoderTest extends OpenSAMLInitBaseTestCase
     }
 
     @Test public void single() throws Exception {
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), ObjectFor(STRING_1));
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
@@ -162,7 +161,7 @@ public class SAML2XMLObjectAttributeEncoderTest extends OpenSAMLInitBaseTestCase
     }
 
     @Test public void multi() throws Exception {
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(ObjectFor(STRING_1), ObjectFor(STRING_2));
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/AttributeSourcedSAML1NameIdentifierGeneratorTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/AttributeSourcedSAML1NameIdentifierGeneratorTest.java
index 055777d..67b2741 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/AttributeSourcedSAML1NameIdentifierGeneratorTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/AttributeSourcedSAML1NameIdentifierGeneratorTest.java
@@ -18,18 +18,8 @@
 package net.shibboleth.idp.saml.nameid.impl;
 
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.Collections;
-
-import net.shibboleth.idp.attribute.IdPAttribute;
-import net.shibboleth.idp.attribute.IdPAttributeValue;
-import net.shibboleth.idp.attribute.ScopedStringAttributeValue;
-import net.shibboleth.idp.attribute.StringAttributeValue;
-import net.shibboleth.idp.attribute.XMLObjectAttributeValue;
-import net.shibboleth.idp.attribute.context.AttributeContext;
-import net.shibboleth.idp.profile.RequestContextBuilder;
-import net.shibboleth.idp.profile.context.RelyingPartyContext;
-import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
+import java.util.List;
 
 import org.opensaml.core.OpenSAMLInitBaseTestCase;
 import org.opensaml.core.xml.config.XMLObjectProviderRegistrySupport;
@@ -42,6 +32,16 @@ import org.testng.Assert;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
+import net.shibboleth.idp.attribute.IdPAttribute;
+import net.shibboleth.idp.attribute.IdPAttributeValue;
+import net.shibboleth.idp.attribute.ScopedStringAttributeValue;
+import net.shibboleth.idp.attribute.StringAttributeValue;
+import net.shibboleth.idp.attribute.XMLObjectAttributeValue;
+import net.shibboleth.idp.attribute.context.AttributeContext;
+import net.shibboleth.idp.profile.RequestContextBuilder;
+import net.shibboleth.idp.profile.context.RelyingPartyContext;
+import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
+
 /** Unit test for {@link AttributeSourcedSAML1NameIdentifierGenerator}. */
 public class AttributeSourcedSAML1NameIdentifierGeneratorTest extends OpenSAMLInitBaseTestCase {
 
@@ -110,7 +110,7 @@ public class AttributeSourcedSAML1NameIdentifierGeneratorTest extends OpenSAMLIn
 
     @Test public void testWrongType() throws Exception {
         final int[] intArray = {1, 2, 3, 4};
-        final Collection<? extends IdPAttributeValue<?>> values = Arrays.asList(new IdPAttributeValue<Object>() {
+        final List<? extends IdPAttributeValue<?>> values = Arrays.asList(new IdPAttributeValue<Object>() {
             public Object getValue() {
                 return intArray;
             }
@@ -131,7 +131,7 @@ public class AttributeSourcedSAML1NameIdentifierGeneratorTest extends OpenSAMLIn
     }
 
     @Test public void testWrongFormat() throws Exception {
-        final Collection<? extends IdPAttributeValue<?>> values = Collections.singletonList(saml1NameIdFor(NAME_1));
+        final List<? extends IdPAttributeValue<?>> values = Collections.singletonList(saml1NameIdFor(NAME_1));
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
         inputAttribute.setValues(values);
         prc.getSubcontext(RelyingPartyContext.class).getSubcontext(AttributeContext.class, true).setIdPAttributes(
@@ -144,7 +144,7 @@ public class AttributeSourcedSAML1NameIdentifierGeneratorTest extends OpenSAMLIn
     }
 
     @Test public void testNameIdentifierValued() throws Exception {
-        final Collection<? extends IdPAttributeValue<?>> values = Collections.singletonList(saml1NameIdFor(NAME_1));
+        final List<? extends IdPAttributeValue<?>> values = Collections.singletonList(saml1NameIdFor(NAME_1));
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
         inputAttribute.setValues(values);
         prc.getSubcontext(RelyingPartyContext.class).getSubcontext(AttributeContext.class, true).setIdPAttributes(
@@ -161,7 +161,7 @@ public class AttributeSourcedSAML1NameIdentifierGeneratorTest extends OpenSAMLIn
     }
 
     @Test public void testMultiNameIdentifierValued() throws Exception {
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(saml2NameIdFor(OTHERID), saml1NameIdFor(NAME_1));
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
@@ -180,7 +180,7 @@ public class AttributeSourcedSAML1NameIdentifierGeneratorTest extends OpenSAMLIn
     }
 
     @Test public void testStringValued() throws Exception {
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Collections.singletonList(new StringAttributeValue(NAME_1));
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
@@ -200,7 +200,7 @@ public class AttributeSourcedSAML1NameIdentifierGeneratorTest extends OpenSAMLIn
     }
 
     @Test public void testScopeValued() throws Exception {
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Collections.singletonList(new ScopedStringAttributeValue(NAME_1, QUALIFIER));
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/AttributeSourcedSAML2NameIDGeneratorTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/AttributeSourcedSAML2NameIDGeneratorTest.java
index 4afc037..232f967 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/AttributeSourcedSAML2NameIDGeneratorTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/AttributeSourcedSAML2NameIDGeneratorTest.java
@@ -18,18 +18,8 @@
 package net.shibboleth.idp.saml.nameid.impl;
 
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.Collections;
-
-import net.shibboleth.idp.attribute.IdPAttributeValue;
-import net.shibboleth.idp.attribute.IdPAttribute;
-import net.shibboleth.idp.attribute.ScopedStringAttributeValue;
-import net.shibboleth.idp.attribute.StringAttributeValue;
-import net.shibboleth.idp.attribute.XMLObjectAttributeValue;
-import net.shibboleth.idp.attribute.context.AttributeContext;
-import net.shibboleth.idp.profile.RequestContextBuilder;
-import net.shibboleth.idp.profile.context.RelyingPartyContext;
-import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
+import java.util.List;
 
 import org.opensaml.core.OpenSAMLInitBaseTestCase;
 import org.opensaml.core.xml.config.XMLObjectProviderRegistrySupport;
@@ -42,6 +32,16 @@ import org.testng.Assert;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
+import net.shibboleth.idp.attribute.IdPAttribute;
+import net.shibboleth.idp.attribute.IdPAttributeValue;
+import net.shibboleth.idp.attribute.ScopedStringAttributeValue;
+import net.shibboleth.idp.attribute.StringAttributeValue;
+import net.shibboleth.idp.attribute.XMLObjectAttributeValue;
+import net.shibboleth.idp.attribute.context.AttributeContext;
+import net.shibboleth.idp.profile.RequestContextBuilder;
+import net.shibboleth.idp.profile.context.RelyingPartyContext;
+import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
+
 /** Unit test for {@link AttributeSourcedSAML2NameIDGenerator}. */
 public class AttributeSourcedSAML2NameIDGeneratorTest extends OpenSAMLInitBaseTestCase {
 
@@ -109,7 +109,7 @@ public class AttributeSourcedSAML2NameIDGeneratorTest extends OpenSAMLInitBaseTe
 
     @Test public void testWrongType() throws Exception {
         final int[] intArray = {1, 2, 3, 4};
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(
                         new IdPAttributeValue<Object>() {
                             public Object getValue() {
@@ -132,7 +132,7 @@ public class AttributeSourcedSAML2NameIDGeneratorTest extends OpenSAMLInitBaseTe
     }
 
     @Test public void testWrongFormat() throws Exception {
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Collections.singletonList(saml2NameIdFor(NAME_1));
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
         inputAttribute.setValues(values);
@@ -146,7 +146,7 @@ public class AttributeSourcedSAML2NameIDGeneratorTest extends OpenSAMLInitBaseTe
     }
     
     @Test public void testNameIDValued() throws Exception {
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Collections.singletonList(saml2NameIdFor(NAME_1));
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
         inputAttribute.setValues(values);
@@ -164,7 +164,7 @@ public class AttributeSourcedSAML2NameIDGeneratorTest extends OpenSAMLInitBaseTe
     }
 
     @Test public void testMultiNameIDValued() throws Exception {
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Arrays.asList(saml2NameIdFor(OTHERID), saml1NameIdFor(NAME_1));
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
@@ -183,7 +183,7 @@ public class AttributeSourcedSAML2NameIDGeneratorTest extends OpenSAMLInitBaseTe
     }
     
     @Test public void testStringValued() throws Exception {
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Collections.singletonList(new StringAttributeValue(NAME_1));
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
@@ -203,7 +203,7 @@ public class AttributeSourcedSAML2NameIDGeneratorTest extends OpenSAMLInitBaseTe
     }
 
     @Test public void testScopeValued() throws Exception {
-        final Collection<? extends IdPAttributeValue<?>> values =
+        final List<? extends IdPAttributeValue<?>> values =
                 Collections.singletonList(new ScopedStringAttributeValue(NAME_1, QUALIFIER));
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/PersistentSAML2NameIDGeneratorTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/PersistentSAML2NameIDGeneratorTest.java
index 8dd787d..0f9a278 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/PersistentSAML2NameIDGeneratorTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/PersistentSAML2NameIDGeneratorTest.java
@@ -150,7 +150,7 @@ public class PersistentSAML2NameIDGeneratorTest extends OpenSAMLInitBaseTestCase
         Assert.assertNull(generator.generate(prc, NameID.PERSISTENT));
         
         final IdPAttribute source = new IdPAttribute("SOURCE");
-        source.setValues(Collections.singleton(new StringAttributeValue(TestSources.COMMON_ATTRIBUTE_VALUE_STRING)));
+        source.setValues(Collections.singletonList(new StringAttributeValue(TestSources.COMMON_ATTRIBUTE_VALUE_STRING)));
         prc.getSubcontext(RelyingPartyContext.class).getSubcontext(AttributeContext.class, true).setUnfilteredIdPAttributes(
                 Collections.singleton(source));
         final NameID id = generator.generate(prc, NameID.PERSISTENT);
@@ -203,7 +203,7 @@ public class PersistentSAML2NameIDGeneratorTest extends OpenSAMLInitBaseTestCase
         Assert.assertNull(generator.generate(prc, NameID.PERSISTENT));
         
         final IdPAttribute source = new IdPAttribute("SOURCE");
-        source.setValues(Collections.singleton(new StringAttributeValue(TestSources.COMMON_ATTRIBUTE_VALUE_STRING)));
+        source.setValues(Collections.singletonList(new StringAttributeValue(TestSources.COMMON_ATTRIBUTE_VALUE_STRING)));
         prc.getSubcontext(RelyingPartyContext.class).getSubcontext(AttributeContext.class, true).setUnfilteredIdPAttributes(
                 Collections.singleton(source));
         NameID id = generator.generate(prc, NameID.PERSISTENT);
@@ -251,7 +251,7 @@ public class PersistentSAML2NameIDGeneratorTest extends OpenSAMLInitBaseTestCase
         Assert.assertNull(generator.generate(prc, NameID.PERSISTENT));
         
         final IdPAttribute source = new IdPAttribute("SOURCE");
-        source.setValues(Collections.singleton(new StringAttributeValue(TestSources.COMMON_ATTRIBUTE_VALUE_STRING)));
+        source.setValues(Collections.singletonList(new StringAttributeValue(TestSources.COMMON_ATTRIBUTE_VALUE_STRING)));
         prc.getSubcontext(RelyingPartyContext.class).getSubcontext(AttributeContext.class, true).setUnfilteredIdPAttributes(
                 Collections.singleton(source));
         NameID id = generator.generate(prc, NameID.PERSISTENT);
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/StoredPersistentIdDecoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/StoredPersistentIdDecoderTest.java
index 2662dfe..76c11a8 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/StoredPersistentIdDecoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/StoredPersistentIdDecoderTest.java
@@ -114,7 +114,7 @@ public class StoredPersistentIdDecoderTest extends OpenSAMLInitBaseTestCase {
         Assert.assertNull(generator.generate(prc, NameID.PERSISTENT));
         
         final IdPAttribute source = new IdPAttribute("SOURCE");
-        source.setValues(Collections.singleton(new StringAttributeValue(TestSources.COMMON_ATTRIBUTE_VALUE_STRING)));
+        source.setValues(Collections.singletonList(new StringAttributeValue(TestSources.COMMON_ATTRIBUTE_VALUE_STRING)));
         prc.getSubcontext(RelyingPartyContext.class).getSubcontext(AttributeContext.class, true).setUnfilteredIdPAttributes(
                 Collections.singleton(source));
         final NameID id = generator.generate(prc, NameID.PERSISTENT);
@@ -140,7 +140,7 @@ public class StoredPersistentIdDecoderTest extends OpenSAMLInitBaseTestCase {
         Assert.assertNull(generator.generate(prc, NameID.PERSISTENT));
         
         final IdPAttribute source = new IdPAttribute("SOURCE");
-        source.setValues(Collections.singleton(new StringAttributeValue(TestSources.COMMON_ATTRIBUTE_VALUE_STRING)));
+        source.setValues(Collections.singletonList(new StringAttributeValue(TestSources.COMMON_ATTRIBUTE_VALUE_STRING)));
         prc.getSubcontext(RelyingPartyContext.class).getSubcontext(AttributeContext.class, true).setUnfilteredIdPAttributes(
                 Collections.singleton(source));
         final NameID id = generator.generate(prc, NameID.PERSISTENT);
@@ -167,7 +167,7 @@ public class StoredPersistentIdDecoderTest extends OpenSAMLInitBaseTestCase {
         Assert.assertNull(generator.generate(prc, NameID.PERSISTENT));
         
         final IdPAttribute source = new IdPAttribute("SOURCE");
-        source.setValues(Collections.singleton(new StringAttributeValue(TestSources.COMMON_ATTRIBUTE_VALUE_STRING)));
+        source.setValues(Collections.singletonList(new StringAttributeValue(TestSources.COMMON_ATTRIBUTE_VALUE_STRING)));
         prc.getSubcontext(RelyingPartyContext.class).getSubcontext(AttributeContext.class, true).setUnfilteredIdPAttributes(
                 Collections.singleton(source));
         final NameID id = generator.generate(prc, NameID.PERSISTENT);
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/impl/AddAttributeStatementToAssertionTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/impl/AddAttributeStatementToAssertionTest.java
index ba0dd58..c7685f8 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/impl/AddAttributeStatementToAssertionTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/impl/AddAttributeStatementToAssertionTest.java
@@ -268,7 +268,7 @@ public class AddAttributeStatementToAssertionTest extends OpenSAMLInitBaseTestCa
         attribute1.setEncoders(collection1);
 
         final IdPAttribute attribute2 = new IdPAttribute(MY_NAME_2);
-        attribute2.setValues(Collections.singleton(new StringAttributeValue(MY_VALUE_2)));
+        attribute2.setValues(Collections.singletonList(new StringAttributeValue(MY_VALUE_2)));
 
         final SAML1StringAttributeEncoder attributeEncoder2 = new SAML1StringAttributeEncoder();
         attributeEncoder2.setName(MY_NAME_2);
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAttributeStatementToAssertionTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAttributeStatementToAssertionTest.java
index 72ce699..6279116 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAttributeStatementToAssertionTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAttributeStatementToAssertionTest.java
@@ -268,7 +268,7 @@ public class AddAttributeStatementToAssertionTest extends OpenSAMLInitBaseTestCa
         attribute1.setEncoders(collection1);
 
         final IdPAttribute attribute2 = new IdPAttribute(MY_NAME_2);
-        attribute2.setValues(Collections.singleton(new StringAttributeValue(MY_VALUE_2)));
+        attribute2.setValues(Collections.singletonList(new StringAttributeValue(MY_VALUE_2)));
 
         final SAML2StringAttributeEncoder attributeEncoder2 = new SAML2StringAttributeEncoder();
         attributeEncoder2.setName(MY_NAME_2);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list