Function function = subsystem.getFunction(functionId);
Function function = Common.getFunction(subsystem, functionId);
  private void correlateSubjectAndFunction    (int subjectIndex,     int functionIndex)  throws ObjectNotFoundException  {    Subject subject      = signet.getSubject          (Signet.DEFAULT_SUBJECT_TYPE_ID,           Common.makeSubjectId(subjectIndex));      PrivilegedSubject pSubject = signet.getPrivilegedSubject(subject);        String functionId = fixtures.makeFunctionId(functionIndex);    Subsystem subsystem = signet.getSubsystem(Constants.SUBSYSTEM_ID);    Function function = subsystem.getFunction(functionId);        // Let's see if this PrivilegedSubject has at least one AssignmentHistory    // record for the specified Function.    AssignmentHistory matchingAssignmentHistoryRecord = null;    Set assignments = pSubject.getAssignmentsReceived();    assignments = Common.filterAssignments(assignments, Status.ACTIVE);    Iterator assignmentsIterator = assignments.iterator();    while (assignmentsIterator.hasNext())    {      Assignment assignment = (Assignment)(assignmentsIterator.next());      Set assignmentHistorySet = assignment.getHistory();      assertEquals(1, assignmentHistorySet.size());            Iterator assignmentHistoryIterator = assignmentHistorySet.iterator();      while (assignmentHistoryIterator.hasNext())      {        AssignmentHistory assignmentHistoryRecord          = (AssignmentHistory)(assignmentHistoryIterator.next());                if (assignmentHistoryRecord.getFunction().equals(function))        {          matchingAssignmentHistoryRecord = assignmentHistoryRecord;        }      }    }        assertNotNull(matchingAssignmentHistoryRecord);  }