diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementServerPropertiesTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementServerPropertiesTests.java index e6cb8721665..bef1554c681 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementServerPropertiesTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementServerPropertiesTests.java @@ -16,13 +16,8 @@ package org.springframework.boot.actuate.autoconfigure.web.server; -import org.junit.After; import org.junit.Test; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.boot.test.util.TestPropertyValues; -import org.springframework.context.annotation.AnnotationConfigApplicationContext; - import static org.assertj.core.api.Assertions.assertThat; /** @@ -33,15 +28,6 @@ import static org.assertj.core.api.Assertions.assertThat; */ public class ManagementServerPropertiesTests { - private AnnotationConfigApplicationContext context; - - @After - public void close() { - if (this.context != null) { - this.context.close(); - } - } - @Test public void defaultManagementServerProperties() { ManagementServerProperties properties = new ManagementServerProperties(); @@ -73,18 +59,4 @@ public class ManagementServerPropertiesTests { assertThat(properties.getServlet().getContextPath()).isEqualTo(""); } - public ManagementServerProperties load(String... environment) { - AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(); - TestPropertyValues.of(environment).applyTo(ctx); - ctx.register(Config.class); - ctx.refresh(); - this.context = ctx; - return this.context.getBean(ManagementServerProperties.class); - } - - @EnableConfigurationProperties(ManagementServerProperties.class) - protected static class Config { - - } - }