'Confirm that the data that was sent matches what we expect from a
timeout: namely, that it ends with a GOAWAY frame carrying an
appropriate error code and last stream ID.'

def assertTimedOut(self, data, frameCount, errorCode, lastStreamID):

    frames = framesFromBytes(data)
    self.assertEqual(len(frames), frameCount)
    self.assertTrue(isinstance(frames[(-1)], hyperframe.frame.GoAwayFrame))
    self.assertEqual(frames[(-1)].error_code, errorCode)
    self.assertEqual(frames[(-1)].last_stream_id, lastStreamID)
