'L{dns._OPTVariableOption.decode} is a classmethod that decodes
a byte string and returns a L{dns._OPTVariableOption} instance.'

def test_decode(self):

    b = BytesIO('\x00\x01\x00\x06foobar')
    o = dns._OPTVariableOption()
    o.decode(b)
    self.assertEqual(o.code, 1)
    self.assertEqual(o.data, 'foobar')
