def METHOD_NAME(self) -> None:
    dns_client_mock = Mock()
    service_name = b"test_service.example.com"
    host_name = b"example.com"
    answer_srv = dns.RRHeader(
        type=dns.SRV, payload=dns.Record_SRV(target=host_name)
    )
    result_deferred: "Deferred[Tuple[List[dns.RRHeader], None, None]]" = Deferred()
    dns_client_mock.lookupService.return_value = result_deferred
    cache: Dict[bytes, List[Server]] = {}
    resolver = SrvResolver(dns_client=dns_client_mock, cache=cache)
    @defer.inlineCallbacks
    def do_lookup() -> Generator["Deferred[object]", object, List[Server]]:
        with LoggingContext("one") as ctx:
            resolve_d = resolver.resolve_service(service_name)
            result: List[Server]
            result = yield defer.ensureDeferred(resolve_d)  # type: ignore[assignment]
            # should have restored our context
            self.assertIs(current_context(), ctx)
            return result
    test_d = do_lookup()
    self.assertNoResult(test_d)
    dns_client_mock.lookupService.assert_called_once_with(service_name)
    result_deferred.callback(([answer_srv], None, None))
    servers = self.successResultOf(test_d)
    self.assertEqual(len(servers), 1)
    self.assertEqual(servers, cache[service_name])
    self.assertEqual(servers[0].host, host_name)