@Test
public void shouldRegisterCollectorOnlyOnce() {

    createCollectorsForEventPartition("event_1", 0);
    createCollectorsForEventPartition("event_1", 0);
    createCollectorsForEventPartition("event_2", 1);
    createCollectorsForEventPartition("event_2", 1);
    assertEquals(2, PrometheusMetrics.getRegisteredCollectors().size());
    PrometheusMetrics.getRegisteredCollectors().get(0)
        .forEach((collectors, childLabels) -> assertEquals(1, childLabels.size()));
    PrometheusMetrics.getRegisteredCollectors().get(1)
        .forEach((collectors, childLabels) -> assertEquals(1, childLabels.size()));
}