       XCTFail("succeeded incorrectly")
     }
     catch URLSessionError.InvalidState {
-      // URLSession called back with a nonsensical combination.
-    }
-    catch {
-      XCTAssert(false, "System behaviour has changed")
+      // URLSession called back with a nonsensical combination of parameters, as expected
     }
 #endif
 

      _ = try task2.get()
      XCTFail("succeeded incorrectly")
    }
    catch let error as URLError {
      XCTAssertEqual(error.code, .unsupportedURL)
    }

    session.finishTasksAndInvalidate()
  }
}

      _ = try task1.get()
      XCTFail("succeeded incorrectly")
    }
    catch let error as URLError where (URLError.unsupportedURL ~= error) {
      XCTAssertNotNil(error.userInfo[NSLocalizedDescriptionKey])
#if os(Linux)
      XCTAssertNil(error.userInfo[NSUnderlyingErrorKey])
