public void listenToService(String serviceName)
  {
    _watchedServiceResources.computeIfAbsent(serviceName, k ->
    {
      XdsClient.NodeResourceWatcher watcher = getServiceResourceWatcher(serviceName);
      _xdsClient.watchXdsResource(D2_SERVICE_NODE_PREFIX + serviceName, watcher);
      return watcher;
    });
  }
@Test(dataProvider = "provideTransportClientProperties")
  public void testListenToService(Map<String, Object> clientOverride, Map<String, Object> original,
      Map<String, Object> overridden)
  {
    XdsToD2PropertiesAdaptorFixture fixture = new XdsToD2PropertiesAdaptorFixture();
    String serviceName = "FooService";
    fixture.getSpiedAdaptor(Collections.singletonMap(serviceName, clientOverride))
        .listenToService(serviceName);

    verify(fixture._xdsClient).watchXdsResource(eq("/d2/services/" + serviceName), anyNodeWatcher());

    NodeResourceWatcher symlinkNodeWatcher = fixture._nodeWatcher;
    symlinkNodeWatcher.onChanged(new XdsClient.NodeUpdate(XdsD2.Node.newBuilder()
        .setData(
            ByteString.copyFrom(
                new ServicePropertiesJsonSerializer().toBytes(
                    new ServiceProperties(
                        serviceName,
                        PRIMARY_CLUSTER_NAME,
                        "",
                        Collections.singletonList("relative"),
                        Collections.emptyMap(),
                        original,
                        Collections.emptyMap(), Collections.emptyList(), Collections.emptySet()
                    )
                )
            )
        )
        .setStat(XdsD2.Stat.newBuilder().setMzxid(1L).build())
        .build())
    );
    verify(fixture._serviceEventBus).publishInitialize(serviceName,
        new ServiceStoreProperties(serviceName, PRIMARY_CLUSTER_NAME, "",
            Collections.singletonList("relative"),
            Collections.emptyMap(),
            overridden,
            Collections.<String, String>emptyMap(), Collections.emptyList(), Collections.emptySet())
    );
  }