InternalDistributedSystemMetricsService implements MetricsService { @Override public MetricsService.Builder getRebuilder() { return builder; } @VisibleForTesting  InternalDistributedSystemMetricsService(MetricsService.Builder builder, Logger logger,
      CollectingServiceLoader<MetricsPublishingService> publishingServiceLoader,
      CompositeMeterRegistry metricsServiceMeterRegistry,
      Collection<MeterRegistry> persistentMeterRegistries, CloseableMeterBinder binder,
      InternalDistributedSystem system, boolean isClient, boolean hasLocator,
      boolean hasCacheServer); @Override void start(); @Override MeterRegistry getMeterRegistry(); @Override MetricsService.Builder getRebuilder(); @Override void stop(); @Override void addSubregistry(MeterRegistry subregistry); @Override void removeSubregistry(MeterRegistry subregistry);  }
@Test public void remembersMetricsServiceBuilder() { MetricsService.Builder theMetricsServiceBuilder = mock(MetricsService.Builder.class); metricsService = new InternalDistributedSystemMetricsService(theMetricsServiceBuilder, logger, publishingServiceLoader, metricsServiceMeterRegistry, emptyList(), meterBinder, system, false, false, true); assertThat(metricsService.getRebuilder()) .isSameAs(theMetricsServiceBuilder); }