You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: atomic_processing_service_spec.rb
    path of file: ./repos/gitlabhq/spec/services/ci/pipeline_processing
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require 'spec_helper'

RSpec.describe Ci::PipelineProcessing::AtomicProcessingService, feature_category: :contin
    
  def mock_play_jobs_during_processing(jobs)
    collection = Ci::PipelineProcessing::AtomicProcessingService::StatusCollection.new(pipeline)

    allow(collection).to receive(:stopped_job_names).and_return(jobs.map(&:name), [])

    # Return the same collection object for every instance of StatusCollection
    allow(Ci::PipelineProcessing::AtomicProcessingService::StatusCollection).to receive(:new)
      .and_return(collection)
  end