         result in
         do {
           let url = try result.get().0
-          let data = try FileHandle(forReadingFrom: url).readDataToEndOfFile()
+          let data = try FileHandle(forReadingFrom: url).availableData
           resolver.resolve(value: data)
         }
         catch URLSessionError.interruptedDownload(let error, let data) {

    XCTAssert(path.isFileURL)
    let file = try FileHandle(forReadingFrom: path)
    defer { file.closeFile() }
    let data = file.readDataToEndOfFile()
    XCTAssert(data.count > 0)
    XCTAssert(response.statusCode == 404)


    let string = handle.map {
      file throws -> String in
      defer { file.closeFile() }
      guard let string = String(data: file.availableData, encoding: .utf8) else { throw TestError() }
      return string
    }

