         }
         wait()
     }
+    #endif
 
     func testBothProcessedAndOriginalImageDataStoredInDataCache() {
         // When
         pipeline.configuration.imageEncodingQueue.isSuspended = true
-        expect(pipeline).toLoadImage(with: request)
         expect(pipeline.configuration.imageEncodingQueue).toFinishWithEnqueuedOperationCount(1)
+        expect(pipeline).toLoadImage(with: request)
 
         // Then
         wait { _ in

    }
}

#if !os(macOS)
class ImagePipelineProcessedDataCachingTests: XCTestCase {
    var dataLoader: MockDataLoader!
    var dataCache: MockDataCache!

        configuration.makeImageEncoder = { _ in
            return encoder
        }
        pipeline = ImagePipeline(configuration: configuration)

        // When
        pipeline.configuration.imageEncodingQueue.isSuspended = true
        expect(pipeline.configuration.imageEncodingQueue).toFinishWithEnqueuedOperationCount(1)
        expect(pipeline).toLoadImage(with: request)

        // Then
        wait { _ in
