diff --git a/dropwizard-health/src/test/java/io/dropwizard/health/HealthCheckConfigValidatorTest.java b/dropwizard-health/src/test/java/io/dropwizard/health/HealthCheckConfigValidatorTest.java index 374909c6c1f..404b25bc9fc 100644 --- a/dropwizard-health/src/test/java/io/dropwizard/health/HealthCheckConfigValidatorTest.java +++ b/dropwizard-health/src/test/java/io/dropwizard/health/HealthCheckConfigValidatorTest.java @@ -147,10 +147,10 @@ void startValidationsShouldFailIfAHealthCheckConfiguredButNotRegistered() throws .contains(" * check-3"); assertThat(logEvent.getFormattedMessage()) .contains(" * check-3"); - assertThat(e.getMessage()).satisfiesAnyOf(message -> { - assertThat(message).contains("[check-3, check-2]"); - assertThat(message).contains("[check-2, check-3]"); - }); + assertThat(e.getMessage()).satisfiesAnyOf( + message -> assertThat(message).contains("[check-3, check-2]"), + message -> assertThat(message).contains("[check-2, check-3]") + ); } } }