diff --git a/src/test/java/org/openrewrite/jenkins/ModernizePluginTest.java b/src/test/java/org/openrewrite/jenkins/ModernizePluginTest.java index 721d33d..2ddc8b1 100644 --- a/src/test/java/org/openrewrite/jenkins/ModernizePluginTest.java +++ b/src/test/java/org/openrewrite/jenkins/ModernizePluginTest.java @@ -112,7 +112,7 @@ class Example { record Versions(String parentVersion, String propertyVersion, String bomArtifactId, String bomVersion) { static Versions parse(String pomXml) { return new Versions( - firstGroupFromFirstRegexMatch(" (4\\.[^<]+)", pomXml), + firstGroupFromFirstRegexMatch(" (5\\.[^<]+)", pomXml), firstGroupFromFirstRegexMatch("([^<]+)", pomXml), firstGroupFromFirstRegexMatch("(bom-[^<]+)", pomXml), firstGroupFromFirstRegexMatch(" ([^<]+)", pomXml) @@ -120,7 +120,7 @@ static Versions parse(String pomXml) { } private static String firstGroupFromFirstRegexMatch(String regex, String pomXml) { - return Pattern.compile(regex).matcher(pomXml).results().findFirst().orElseThrow().group(1); + return Pattern.compile(regex).matcher(pomXml).results().findFirst().orElseThrow(() -> new IllegalStateException(pomXml)).group(1); } @Language("XML") String asPomXml() {