diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/PatternParseFailureAnalyzerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/PatternParseFailureAnalyzerTests.java index 4b4b55eefb..87eb14b67d 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/PatternParseFailureAnalyzerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/PatternParseFailureAnalyzerTests.java @@ -36,14 +36,11 @@ class PatternParseFailureAnalyzerTests { @Test void patternParseFailureQuotesPattern() { FailureAnalysis failureAnalysis = performAnalysis("/spring/**/framework"); - assertThat(failureAnalysis.getDescription()).contains(""" - Invalid mapping pattern detected: - /spring/**/framework - ^ - """); + assertThat(failureAnalysis.getDescription()) + .contains("Invalid mapping pattern detected:\n" + "/spring/**/framework\n" + " ^"); assertThat(failureAnalysis.getAction()) - .contains("Fix this pattern in your application or switch to the legacy parser" - + " implementation with 'spring.mvc.pathmatch.matching-strategy=ant_path_matcher'."); + .contains("Fix this pattern in your application or switch to the legacy parser" + + " implementation with 'spring.mvc.pathmatch.matching-strategy=ant_path_matcher'."); } private FailureAnalysis performAnalysis(String pattern) {