From 482ecc606cb3d4259d20c94591178421703a88ec Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 19 Feb 2018 22:46:31 +0000 Subject: [PATCH] Polish --- ...atsdMetricsExportAutoConfigurationTests.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/statsd/StatsdMetricsExportAutoConfigurationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/statsd/StatsdMetricsExportAutoConfigurationTests.java index 9348287e92..02c525ec72 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/statsd/StatsdMetricsExportAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/statsd/StatsdMetricsExportAutoConfigurationTests.java @@ -24,6 +24,7 @@ import io.micrometer.core.instrument.config.NamingConvention; import io.micrometer.core.instrument.util.HierarchicalNameMapper; import io.micrometer.statsd.StatsdConfig; import io.micrometer.statsd.StatsdMeterRegistry; +import io.micrometer.statsd.StatsdMetrics; import org.junit.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; @@ -67,7 +68,8 @@ public class StatsdMetricsExportAutoConfigurationTests { @Test public void autoConfigurationCanBeDisabled() { - this.contextRunner.withPropertyValues("management.metrics.export.statsd.enabled=false") + this.contextRunner + .withPropertyValues("management.metrics.export.statsd.enabled=false") .run((context) -> assertThat(context) .doesNotHaveBean(StatsdMeterRegistry.class) .doesNotHaveBean(StatsdConfig.class) @@ -103,12 +105,13 @@ public class StatsdMetricsExportAutoConfigurationTests { @Test public void stopsMeterRegistryWhenContextIsClosed() { - this.contextRunner.withUserConfiguration(BaseConfiguration.class).run((context) -> { - StatsdMeterRegistry registry = spyOnDisposableBean(StatsdMeterRegistry.class, - context); - context.close(); - verify(registry).stop(); - }); + this.contextRunner.withUserConfiguration(BaseConfiguration.class) + .run((context) -> { + StatsdMeterRegistry registry = spyOnDisposableBean( + StatsdMeterRegistry.class, context); + context.close(); + verify(registry).stop(); + }); } @SuppressWarnings("unchecked")