def METHOD_NAME(self):
    # Mask flag correctly set.
    self.decode(b"\x80\x80\x00\x00\x00\x00", mask=True)
    # Mask flag incorrectly unset.
    with self.assertRaises(ProtocolError):
        self.decode(b"\x80\x80\x00\x00\x00\x00")
    # Mask flag correctly unset.
    self.decode(b"\x80\x00")
    # Mask flag incorrectly set.
    with self.assertRaises(ProtocolError):
        self.decode(b"\x80\x00", mask=True)