it('Successfully publishes subscribe and sync jobs', function() {
            var completed;
            var job2 = jobUtil.createVistaSubscribeRequest('C877', {
                type: 'pid',
                value: 'C877;8'
            });
            var job3 = jobUtil.createVistaSubscribeRequest('9E7A', {
                type: 'pid',
                value: '9E7A;8'
            });

            runs(function() {
                handle._steps._publishJobs.call(options, [job2, job3], function(error, result) {
                    completed = true;
                    expectedError = error;
                    expectedResult = result;
                });
            });

            waitsFor(function() {
                return completed;
            }, 'should be called', 100);

            runs(function() {
                expect(expectedError).toBeNull();
                expect(expectedResult.length).toBe(2);
            });
        });
    it('verify has()', function() {
        var job2 = jobUtil.createVistaSubscribeRequest('C877', {
            type: 'pid',
            value: 'C877;8'
        });
        var job3 = jobUtil.createVistaSubscribeRequest('9E7A', {
            type: 'pid',
            value: '9E7A;8'
        });

        expect(has([options.job], jobUtil.enterpriseSyncRequestType())).toBe(true);
        expect(has([job2], jobUtil.vistaSubscribeRequestType('C877'))).toBe(true);
        expect(has([options.job], jobUtil.hdrXformVprType())).toBe(false);
        expect(has([job2, job3], jobUtil.vistaSubscribeRequestType('00A0'))).toBe(false);
    });
    jobStatusUpdater: jobStatusUpdaterDummy
};

var vistaId = '9E7A';
var pidSite = '9E7A';
var pid = pidSite + ';3';
var patientIdentifier = idUtil.create('pid', pid);
var jobId = '2';
var rootJobId = '1';
var pollerJobId = '3';
var meta = {
    jobId : jobId,
    rootJobId: rootJobId,
    jpid: '21EC2020-3AEA-4069-A2DD-FFFFFFFFFFFF'
};
var job = jobUtil.createVistaSubscribeRequest(vistaId, patientIdentifier, meta);

//--------------------------------------------------------------------------------------------------
// Overall plan on this class is to test each individual step and make sure that the appropriate
// JDS functions are called as well as the RPC functions are called with the appropriate values.
// One final test verifies that the entire set of steps all make the appropriate calls.
//-------------------------------------------------------------------------------------------------

describe('vista-subscribe-request-handler.js', function() {
    beforeEach(function() {
        // Underlying JDS and RPC calls to monitor and make sure that they are made.
        //---------------------------------------------------------------------------
        spyOn(jobStatusUpdaterDummy, 'startJobStatus').andCallThrough();
        spyOn(jobStatusUpdaterDummy, 'createJobStatus').andCallThrough();
        spyOn(jobStatusUpdaterDummy, 'completeJobStatus').andCallThrough();
        spyOn(environment.vistaClient, 'subscribe').andCallThrough();