diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/MongoHealthIndicatorTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/MongoHealthIndicatorTests.java index 92fab789270..4110b222d8d 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/MongoHealthIndicatorTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/MongoHealthIndicatorTests.java @@ -85,8 +85,8 @@ public class MongoHealthIndicatorTests { MongoHealthIndicator healthIndicator = new MongoHealthIndicator(mongoTemplate); Health health = healthIndicator.health(); assertThat(health.getStatus()).isEqualTo(Status.DOWN); - assertThat(((String) health.getDetails().get("error")) - .contains("Connection failed")); + assertThat((String) health.getDetails().get("error")) + .contains("Connection failed"); verify(mongoTemplate).executeCommand("{ buildInfo: 1 }"); } diff --git a/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java b/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java index e66b94dc757..1cf53cfc3c0 100644 --- a/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java @@ -802,7 +802,7 @@ public class SpringApplicationTests { this.context = application.run(); assertThat(this.context.getEnvironment()) .isNotInstanceOf(StandardServletEnvironment.class); - assertThat(this.context.getEnvironment().getProperty("foo")); + assertThat(this.context.getEnvironment().getProperty("foo")).isEqualTo("bar"); assertThat(this.context.getEnvironment().getPropertySources().iterator().next() .getName()).isEqualTo( TestPropertySourceUtils.INLINED_PROPERTIES_PROPERTY_SOURCE_NAME);