@Test
  public void getMeterRegistry_returnsMetricsSessionMeterRegistry() {
    MeterRegistry sessionMeterRegistry = mock(MeterRegistry.class);

    MetricsService metricsSession = mock(MetricsService.class);
    when(metricsSession.getMeterRegistry()).thenReturn(sessionMeterRegistry);

    MetricsService.Builder metricsSessionBuilder = mock(MetricsService.Builder.class);
    when(metricsSessionBuilder.build(any())).thenReturn(metricsSession);
    when(metricsSession.getMeterRegistry()).thenReturn(sessionMeterRegistry);

    createSystem(getCommonProperties(), metricsSessionBuilder);

    assertThat(system.getMeterRegistry()).isSameAs(sessionMeterRegistry);
  }
Create a <Code>DistributedSystem</code> with a non-default name.
geode-core/src/integrationTest/java/org/apache/geode/distributed/internal/InternalDistributedSystemIntegrationTest.java