@VisibleForTesting
  protected Collection<StreamsMetadata> getStreamsMetadata() {
    if (sharedRuntimesEnabled && kafkaStreams instanceof KafkaStreamsNamedTopologyWrapper) {
      return ((KafkaStreamsNamedTopologyWrapper) kafkaStreams)
          .streamsMetadataForStore(storeName, queryId);
    }

    return kafkaStreams.streamsMetadataForStore(storeName);
  }
@Test
  public void shouldUseNamedTopologyWhenSharedRuntimeIsEnabledForStreamsMetadataForStore() {
    // Given:
    final KsLocator locator = new KsLocator(STORE_NAME, kafkaStreamsNamedTopologyWrapper, topology,
        keySerializer, LOCAL_HOST_URL, true, "queryId");

    // When:
    locator.getStreamsMetadata();

    // Then:
    Mockito.verify(kafkaStreamsNamedTopologyWrapper).streamsMetadataForStore(STORE_NAME, "queryId");
  }