@Override
    public void registerMetrics(MetricGroup metricGroup) {
        for (JobStatus jobStatus : JobStatus.values()) {
            if (!jobStatus.isTerminalState() && jobStatus != JobStatus.RECONCILING) {

                final StateTimeMetric stateTimeMetric = createTimeMetric(jobStatus);

                StateTimeMetric.register(
                        jobStatusMetricsSettings,
                        metricGroup,
                        stateTimeMetric,
                        getBaseMetricName(jobStatus));
            }
        }
    }
@Test
    void testStatusSelection() {
        final InterceptingOperatorMetricGroup metricGroup = new InterceptingOperatorMetricGroup();

        final JobStatusMetrics jobStatusMetrics =
                new JobStatusMetrics(0L, enable(MetricOptions.JobStatusMetrics.STATE));
        jobStatusMetrics.registerMetrics(metricGroup);
        final Map<JobStatus, StateTimeMetricTest.StatusMetricSet> registeredMetrics =
                extractMetrics(metricGroup);

        for (JobStatus value : JobStatus.values()) {
            if (value.isTerminalState() || value == JobStatus.RECONCILING) {
                assertThat(registeredMetrics).doesNotContainKey(value);
            } else {
                assertThat(registeredMetrics).containsKey(value);
            }
        }
    }