diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java index 1f9319b3bf..29f674405b 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java @@ -185,9 +185,9 @@ public class SpringApplicationTests { @Test public void sourcesMustBeAccessible() { - assertThatIllegalStateException().isThrownBy( + assertThatIllegalArgumentException().isThrownBy( () -> new SpringApplication(InaccessibleConfiguration.class).run()) - .withMessageContaining("Cannot load configuration"); + .withMessageContaining("No visible constructors"); } @Test