         let headerBytes: [Byte] = [0x82, 0x7F] + sixFiveFiveThreeSix
 
         let input = headerBytes + randomBinary
-        let msg = try FrameParser(buffer: input).acceptFrame()
+        let test = TestStream()
+        try test.send(input)
+        let msg = try FrameParser(stream: test).acceptFrame()
         XCTAssertFalse(msg.isControlFrame)
 
         let payload = msg.payload.bytes


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

        let header = msg.header

         Client to Server MUST be masked
         */
        let input: [Byte] = [0x8a, 0x85, 0x37, 0xfa, 0x21, 0x3d, 0x7f, 0x9f, 0x4d, 0x51, 0x58]
        let test = TestStream()
        try test.send(input)
        let msg = try FrameParser(stream: test).acceptFrame()
        XCTAssert(msg.isControlFrame)

        // is Hello, but message doesn't matter. Must match `ping` payload
