code: public static Subject populateSubject(Subject subject, Collection<IAutoCredentials> autos, Map<String, String> credentials) {
          try {
              if (subject == null) {
                  subject = new Subject();
              }
              for (IAutoCredentials autoCred : autos) {
                  autoCred.populateSubject(subject, credentials);
              }
              return subject;
          } catch (Exception e) {
              throw new RuntimeException(e);
          }
      }
docs: Populate a subject from credentials using the IAutoCredentials.
  
  @param subject the subject to populate or null if a new Subject should be created.
  @param autos the IAutoCredentials to call to populate the subject.
  @param credentials the credentials to pull from
  @return the populated subject.