@Override
  public int getRemovedCount() {
    int count = 0;
    for (final MockProcessSession session : sessionFactory.getCreatedSessions()) {
      count += session.getRemovedCount();
    }

    return count;
  }
 @Override
 public void enqueue(final InputStream data, final Map<String, String> attributes) {
   final MockProcessSession session =
       new MockProcessSession(new SharedSessionState(processor, idGenerator), processor);
   MockFlowFile flowFile = session.create();
   flowFile = session.importFrom(data, flowFile);
   flowFile = session.putAllAttributes(flowFile, attributes);
   enqueue(flowFile);
 }
  @Override
  public List<MockFlowFile> getPenalizedFlowFiles() {
    final List<MockFlowFile> flowFiles = new ArrayList<>();
    for (final MockProcessSession session : sessionFactory.getCreatedSessions()) {
      flowFiles.addAll(session.getPenalizedFlowFiles());
    }

    Collections.sort(
        flowFiles,
        new Comparator<MockFlowFile>() {
          @Override
          public int compare(final MockFlowFile o1, final MockFlowFile o2) {
            return Long.compare(o1.getCreationTime(), o2.getCreationTime());
          }
        });

    return flowFiles;
  }
 @Override
 public void clearTransferState() {
   for (final MockProcessSession session : sessionFactory.getCreatedSessions()) {
     session.clearTransferState();
   }
 }
 @Override
 public void assertAllFlowFiles(Relationship relationship, FlowFileValidator validator) {
   for (final MockProcessSession session : sessionFactory.getCreatedSessions()) {
     session.assertAllFlowFiles(relationship, validator);
   }
 }
 @Override
 public void assertAllFlowFilesTransferred(final Relationship relationship) {
   for (final MockProcessSession session : sessionFactory.getCreatedSessions()) {
     session.assertAllFlowFilesTransferred(relationship);
   }
 }