 
     func testFragmentedUnmaskedTextMessageTwo() throws {
         let input: [Byte] = [0x80, 0x02, 0x6c, 0x6f]
-        let msg = try FrameParser(buffer: input).acceptFrame()
+        let test = TestStream()
+        try test.send(input)
+        let msg = try FrameParser(stream: test).acceptFrame()
         XCTAssert(msg.isFragment)
         XCTAssert(msg.isFragmentFooter)
         XCTAssertFalse(msg.isControlFrame)


    func testSingleFrameUnmaskedTextMessage() throws {
        let input: [Byte] = [0x81, 0x05, 0x48, 0x65, 0x6c, 0x6c, 0x6f]
        let msg = try FrameParser(buffer: input).acceptFrame()
        let str = try msg.payload.toString()
        XCTAssert(str == "Hello")

        let header = msg.header


    func testSingleFrameMaskedTextMessage() throws {
        let input: [Byte] = [0x81, 0x85, 0x37, 0xfa, 0x21, 0x3d, 0x7f, 0x9f, 0x4d, 0x51, 0x58]
        let test = TestStream()
        try test.send(input)
        let msg = try FrameParser(stream: test).acceptFrame()
        let str = msg.payload.string
        XCTAssert(str == "Hello")

        let header = msg.header
