private Collector createCollector(List<MapperConfig> mapperConfigs) {
        return new DropwizardExports(
                metricRegistry,
                new PrometheusMetricFilter(mapperConfigs),
                new CustomMappingSampleBuilder(mapperConfigs)
        );
    }
@Test
    void testCreateCollector() {
        when(prometheusMappingFilesHandlerProvider.get()).thenReturn(prometheusMappingFilesHandler);
        when(prometheusMappingFilesHandler.getMapperConfigs()).thenReturn(Collections.singletonList(new MapperConfig(
                "org.graylog2.plugin.streams.Stream.*.StreamRule.*.executionTime",
                "stream_rules_execution_time",
                Collections.emptyMap()
        )));

        metricRegistry.timer(MetricRegistry.name(Stream.class, "stream-id", "StreamRule", "stream-rule-id",
                "executionTime"));
        metricRegistry.timer(MetricRegistry.name(JvmStats.class, "jvm-stats"));

        Collector collector = classUnderTest.createCollector();

        assertThat(collector.collect()).hasSize(1);
    }