         let parameters = MultipartFormDataBodyParameters(parts: [part])
 
         do {
-            guard case .InputStream(let inputStream) = try parameters.buildEntity() else {
+            guard case .Data(let data) = try parameters.buildEntity() else {
                 XCTFail()
                 return
             }
 
-            let data = try! NSData(inputStream: inputStream, capacity: 64)
             let string = String(data: data, encoding:NSUTF8StringEncoding)!
             XCTAssertEqual(string, "--\(parameters.boundary)\r\nContent-Disposition: form-data; name=\"foo\"\r\n\r\n3.14\r\n--\(parameters.boundary)--\r\n")
         } catch {

        let parameters = MultipartFormDataBodyParameters(parts: [part])

        do {
            guard case .InputStream(let inputStream) = try parameters.buildEntity() else {
                XCTFail()
                return
            }

            let data = try! NSData(inputStream: inputStream, capacity: 64)
            let string = String(data: data, encoding:NSUTF8StringEncoding)!
            XCTAssertEqual(string, "--\(parameters.boundary)\r\nContent-Disposition: form-data; name=\"foo\"\r\n\r\n123\r\n--\(parameters.boundary)--\r\n")
        } catch {

        let parameters = MultipartFormDataBodyParameters(parts: [part])

        do {
            guard case .Data(let data) = try parameters.buildEntity() else {
                XCTFail()
                return
            }

            let string = String(data: data, encoding:NSUTF8StringEncoding)!
            XCTAssertEqual(string, "--\(parameters.boundary)\r\nContent-Disposition: form-data; name=\"foo\"\r\n\r\nabcdef\r\n--\(parameters.boundary)--\r\n")
        } catch {
