@Override
    public MetricsCollector create(final MetricConfiguration metricConfig) {
        switch (metricConfig.getType()) {
            case COUNTER:
                return new PrometheusMetricsCounterCollector(metricConfig);
            case GAUGE:
                return new PrometheusMetricsGaugeCollector(metricConfig);
            case HISTOGRAM:
                return new PrometheusMetricsHistogramCollector(metricConfig);
            case SUMMARY:
                return new PrometheusMetricsSummaryCollector(metricConfig);
            case GAUGE_METRIC_FAMILY:
                return new PrometheusMetricsGaugeMetricFamilyCollector(metricConfig);
            default:
                throw new UnsupportedOperationException(String.format("Can not support type `%s`.", metricConfig.getType()));
        }
    }
@Test
    void assertCreateSummaryCollector() {
        MetricConfiguration config = new MetricConfiguration("test_summary", MetricCollectorType.SUMMARY, null, Collections.emptyList(), Collections.emptyMap());
        assertThat(new PrometheusMetricsCollectorFactory().create(config), instanceOf(PrometheusMetricsSummaryCollector.class));
    }