diff --git a/dropwizard-core/src/test/java/io/dropwizard/validation/InjectValidatorFeatureTest.java b/dropwizard-core/src/test/java/io/dropwizard/validation/InjectValidatorFeatureTest.java
index <HASH>..<HASH> 100644
--- a/dropwizard-core/src/test/java/io/dropwizard/validation/InjectValidatorFeatureTest.java
+++ b/dropwizard-core/src/test/java/io/dropwizard/validation/InjectValidatorFeatureTest.java
@@ -36,7 +36,7 @@ class InjectValidatorFeatureTest {
     private ValidatorFactory validatorFactory;
 
     @BeforeEach
-    void setUp() throws Exception {
+    void setUp() {
         Bootstrap<Configuration> bootstrap = new Bootstrap<>(application);
         application.initialize(bootstrap);
 
@@ -57,14 +57,10 @@ class InjectValidatorFeatureTest {
         // Run validation manually
         Set<ConstraintViolation<Bean>> constraintViolations = validator.validate(new Bean(1));
 
-
-        assertThat(constraintViolations.size()).isEqualTo(1);
-
-        Optional<String> message = constraintViolations.stream()
-            .findFirst()
-            .map(ConstraintViolation::getMessage);
-
-        assertThat(message).hasValue("must be greater than or equal to 10");
+        assertThat(constraintViolations)
+            .singleElement()
+            .extracting(ConstraintViolation::getMessage)
+            .isEqualTo("must be greater than or equal to 10");
     }
 
     @Test
Simplify InjectValidatorFeatureTest