@Override
  public void onCreate(
      final ServiceContext serviceContext,
      final MetaStore metaStore,
      final QueryMetadata queryMetadata) {
    if (perQuery.containsKey(queryMetadata.getQueryId())) {
      return;
    }
    perQuery.put(
        queryMetadata.getQueryId(),
        new PerQueryListener(
            metrics,
            metricsPrefix,
            queryMetadata.getQueryId().toString(),
            metricsTags
        )
    );
  }
@Test
  public void shouldInitiallyHaveInitialState() {
    // When:
    listener.onCreate(serviceContext, metaStore, query);

    // Then:
    assertThat(currentGaugeValue(METRIC_NAME_1), is("-"));
    assertThat(currentGaugeValue(METRIC_NAME_2), is("NO_ERROR"));
    assertThat(currentGaugeNumValue(NUM_METRIC_NAME_1), is(-1));
    assertThat(currentGaugeNumValue(NUM_METRIC_NAME_2), is(-1));
    assertThat(currentGaugeNumValue(NUM_METRIC_NAME_3), is(-1));
  }