'L{ResolverBase.query} returns a L{Deferred} which fires with the result
of the method found in the C{typeToMethod} mapping for the type of the
query passed to it.'

def test_typeToMethodResult(self):

    expected = object()
    resolver = ResolverBase()
    resolver.typeToMethod = {54321: (lambda query, timeout: expected)}
    query = Query(name='example.com', type=54321)
    queryDeferred = resolver.query(query, 123)
    result = []
    queryDeferred.addBoth(result.append)
    self.assertEqual(expected, result[0])
