         let csv = "abab,,cdcd,efef\r\nzxcv,asdf,\"qw\"\"er\","
         let encoding = NSUTF32StringEncoding
         let mutableData = NSMutableData()
-        mutableData.append(utf32LittleEndianBOM, length: utf32LittleEndianBOM.count)
-        mutableData.append(csv.data(using: NSUTF32LittleEndianStringEncoding)!)
-        let records = parse(data: mutableData, encoding: encoding)
+        mutableData.appendBytes(utf32LittleEndianBOM, length: utf32LittleEndianBOM.count)
+        mutableData.appendData(csv.dataUsingEncoding(NSUTF32LittleEndianStringEncoding)!)
+        let records = parseData(mutableData, encoding: encoding)
         XCTAssertEqual(records[0], ["abab", "", "cdcd", "efef"])
         XCTAssertEqual(records[1], ["zxcv", "asdf", "qw\"er", ""])
     }

        let csv = "abab,,cdcd,efef\r\nzxcv,asdf,\"qw\"\"er\","
        let encoding = NSUTF16StringEncoding
        let mutableData = NSMutableData()
        mutableData.append(utf16LittleEndianBOM, length: utf16LittleEndianBOM.count)
        mutableData.append(csv.data(using: NSUTF16LittleEndianStringEncoding)!)
        let records = parse(data: mutableData, encoding: encoding)
        XCTAssertEqual(records[0], ["abab", "", "cdcd", "efef"])
        XCTAssertEqual(records[1], ["zxcv", "asdf", "qw\"er", ""])
    }

    func testExample12() {
        let csv = "abab,,\"\rcdcd\n\",efef\r\nzxcv,asdf,\"qw\"\"er\",\n"
        let encoding = NSUTF8StringEncoding
        let records = parseCSV(csv, encoding: encoding)
        XCTAssertEqual(records.count, 2)
        XCTAssertEqual(records[0], ["abab", "", "\rcdcd\n", "efef"])
        XCTAssertEqual(records[1], ["zxcv", "asdf", "qw\"er", ""])
