 
     func testThatExpiredCertificateRequestSucceedsWhenDisablingEvaluation() {
         // Given
-        let policies = [host: ServerTrustPolicy.disableEvaluation]
-        let manager = SessionManager(
-            configuration: configuration,
-            serverTrustPolicyManager: ServerTrustPolicyManager(policies: policies)
-        )
-
-        weak var expectation = self.expectation(description: "\(urlString)")
-        var error: Error?
-
-        // When
-        manager.request(urlString)
-            .response { resp in
-                error = resp.error
-                expectation?.fulfill()
+        let policies = [expiredHost: ServerTrustPolicy.disableEvaluation]
+        let manager = SessionManager(
+            configuration: configuration,
+            serverTrustPolicyManager: ServerTrustPolicyManager(policies: policies)
+        )
+
+        let expectation = self.expectation(description: "\(expiredURLString)")
+        var error: Error?
+
+        // When
+        manager.request(expiredURLString)
+            .response { resp in
+                error = resp.error
+                expectation.fulfill()
             }
 
         waitForExpectations(timeout: timeout, handler: nil)

        // Given
        let certificates = [TestCertificates.leaf]
        let policies: [String: ServerTrustPolicy] = [
            host: .pinCertificates(certificates: certificates, validateCertificateChain: false, validateHost: true)
        ]

        let manager = SessionManager(
            configuration: configuration,
            serverTrustPolicyManager: ServerTrustPolicyManager(policies: policies)
        )

        weak var expectation = self.expectation(description: "\(urlString)")
        var error: Error?

        // When
        manager.request(urlString)
            .response { resp in
                error = resp.error
                expectation?.fulfill()
            }

        waitForExpectations(timeout: timeout, handler: nil)

        // Given
        let publicKeys = [TestPublicKeys.rootCA]
        let policies: [String: ServerTrustPolicy] = [
            expiredHost: .pinPublicKeys(publicKeys: publicKeys, validateCertificateChain: false, validateHost: true)
        ]

        let manager = SessionManager(
            configuration: configuration,
            serverTrustPolicyManager: ServerTrustPolicyManager(policies: policies)
        )

        let expectation = self.expectation(description: "\(expiredURLString)")
        var error: Error?

        // When
        manager.request(expiredURLString)
            .response { resp in
                error = resp.error
                expectation.fulfill()
            }

        waitForExpectations(timeout: timeout, handler: nil)
