@Test
public void usesRegistryFromProperty() {

    SharedMetricRegistries.add("something_else", registry);
    System.setProperty(InstrumentedAppender.REGISTRY_PROPERTY_NAME, "something_else");
    final InstrumentedAppender shared = new InstrumentedAppender();
    shared.start();
    when(event.getLevel()).thenReturn(Level.INFO);
    shared.doAppend(event);
    assertThat(SharedMetricRegistries.names()).contains("something_else");
    assertThat(registry.meter(METRIC_NAME_PREFIX + ".info").getCount())
            .isEqualTo(1);
}