code: public List<Subject> setupSubjects(List<Map<URI, List<AttributeValue>>> subjs) {
  
          if (subjs == null || subjs.size() == 0) {
              return Collections.singletonList(new Subject(new ArrayList<Attribute>()));
          }
  
          List<Subject> subjects = new ArrayList<Subject>(subjs.size());
          // Go through each of the subjects
          for (Map<URI, List<AttributeValue>> s : subjs) {
              List<Attribute> attributes = new ArrayList<Attribute>();
  
              // Extract and create the attributes for this subject and add them
              // to the set
              for (URI uri : s.keySet()) {
                  List<AttributeValue> attributeValues = s.get(uri);
                  if (attributeValues != null && attributeValues.size() > 0) {
                      attributes.add(
                          new BasicAttribute(uri, attributeValues.get(0).getType(),
                              null, null, attributeValues));
                  }
              }
  
              // Create a new subject and add the attributes for this subject
              subjects.add(new Subject(attributes));
          }
  
          return subjects;
      }
docs: Sets up the Subject section of the request. Takes a list of Maps of
  URI/AttributeValue pairs. Each list element represents one subject which
  contains a map of URI/AttributeValues.
  
  @return a Set of Subject instances for inclusion in a Request