AttributeCollection implements Serializable { public AttributeCollection() { this.map = Collections.synchronizedMap(new HashMap<AttributeIdentifier, Map<EntityAttributes, Attribute<?>>>()); } AttributeCollection(); void add(Attribute<? extends Object> attribute); void addAll(AttributeCollection attrCollection); Collection<Attribute> getAttributes(); Set<AttributeIdentifier> getAttributeIdentifiers(); Collection<Attribute<?>> getAttributes(AttributeIdentifier identifier); Attribute getAttribute(AttributeIdentifier identifier, EntityAttributes issuer); Map<EntityAttributes, Attribute<?>> getAttributeMap(AttributeIdentifier identifier); int size(); boolean isSameEntity(AttributeCollection collection); String toString();  }
@Test public void testAttributeCollection() throws Exception { stringDatatype = new URI("http: subjectId = new URI("urn:oasis:names:tc:xacml:1.0:subject:subject-id"); tokenId = new URI("urn:org:globus:test:token-id"); AttributeIdentifier attrIden = new AttributeIdentifier(subjectId, stringDatatype, true); Set<String> hset = new HashSet<String>(); hset.add("dummy"); Attribute<String> attr = new Attribute<String>(attrIden, null, Calendar.getInstance(), null, hset); IdentityAttributeCollection coll = new IdentityAttributeCollection(); coll.add(attr); issuer = new EntityAttributes(coll, null, null); issuer2 = new EntityAttributes(coll, null, null); hset = new HashSet<String>(); hset.add("dummy123"); attr = new Attribute<String>(attrIden, null, Calendar.getInstance(), null, hset); coll = new IdentityAttributeCollection(); coll.add(attr); issuer1 = new EntityAttributes(coll, null, null); attrCollectionTest(false); attrCollectionTest(true); }