@Test public void metricsListener_returns_null_object_if_no_metrics_reporters_are_enabled() { Config configNoReporters = TypesafeConfigUtil.loadConfigForAppIdAndEnvironment(APP_ID, "compiletimetest") .withValue("metrics.slf4j.reporting.enabled", ConfigValueFactory.fromAnyRef(false)) .withValue("metrics.graphite.reporting.enabled", ConfigValueFactory.fromAnyRef(false)) .withValue("metrics.jmx.reporting.enabled", ConfigValueFactory.fromAnyRef(false)); AppServerConfig asc = new AppServerConfig(configNoReporters); MetricsListener obj = asc.metricsListener(); assertThat(obj).isNull(); }
@Override public @Nullable MetricsListener metricsListener() { return guiceValues.metricsListener; }
AppServerConfig implements ServerConfig { @Override public @Nullable MetricsListener metricsListener() { return guiceValues.metricsListener; } }
AppServerConfig implements ServerConfig { @Override public @Nullable MetricsListener metricsListener() { return guiceValues.metricsListener; } protected  AppServerConfig(Config appConfig, PropertiesRegistrationGuiceModule propertiesRegistrationGuiceModule);  AppServerConfig(Config appConfig); }
AppServerConfig implements ServerConfig { @Override public @Nullable MetricsListener metricsListener() { return guiceValues.metricsListener; } protected  AppServerConfig(Config appConfig, PropertiesRegistrationGuiceModule propertiesRegistrationGuiceModule);  AppServerConfig(Config appConfig); @Override @Nullable AccessLogger accessLogger(); @Override @Nullable CompletableFuture<@Nullable AppInfo> appInfo(); @Override @Nullable MetricsListener metricsListener(); @Override @Nullable RequestSecurityValidator requestSecurityValidator(); @Override @Nullable List<@NotNull PostServerStartupHook> postServerStartupHooks(); @Override @Nullable List<@NotNull ServerShutdownHook> serverShutdownHooks(); @Override @NotNull Collection<@NotNull Endpoint<?>> appEndpoints(); @Override @NotNull RiposteErrorHandler riposteErrorHandler(); @Override @NotNull RiposteUnhandledErrorHandler riposteUnhandledErrorHandler(); @Override @Nullable RequestValidator requestContentValidationService(); @Override boolean isDebugActionsEnabled(); @Override boolean isDebugChannelLifecycleLoggingEnabled(); @Override int endpointsPort(); @Override int endpointsSslPort(); @Override boolean isEndpointsUseSsl(); @Override int numBossThreads(); @Override int numWorkerThreads(); @Override int maxRequestSizeInBytes(); }
AppServerConfig implements ServerConfig { @Override public @Nullable MetricsListener metricsListener() { return guiceValues.metricsListener; } protected  AppServerConfig(Config appConfig, PropertiesRegistrationGuiceModule propertiesRegistrationGuiceModule);  AppServerConfig(Config appConfig); @Override @Nullable AccessLogger accessLogger(); @Override @Nullable CompletableFuture<@Nullable AppInfo> appInfo(); @Override @Nullable MetricsListener metricsListener(); @Override @Nullable RequestSecurityValidator requestSecurityValidator(); @Override @Nullable List<@NotNull PostServerStartupHook> postServerStartupHooks(); @Override @Nullable List<@NotNull ServerShutdownHook> serverShutdownHooks(); @Override @NotNull Collection<@NotNull Endpoint<?>> appEndpoints(); @Override @NotNull RiposteErrorHandler riposteErrorHandler(); @Override @NotNull RiposteUnhandledErrorHandler riposteUnhandledErrorHandler(); @Override @Nullable RequestValidator requestContentValidationService(); @Override boolean isDebugActionsEnabled(); @Override boolean isDebugChannelLifecycleLoggingEnabled(); @Override int endpointsPort(); @Override int endpointsSslPort(); @Override boolean isEndpointsUseSsl(); @Override int numBossThreads(); @Override int numWorkerThreads(); @Override int maxRequestSizeInBytes();  }