diff --git a/src/test/java/org/opentripplanner/test/support/JsonAssertions.java b/src/test/java/org/opentripplanner/test/support/JsonAssertions.java index e836ace81fd..1fe87268eee 100644 --- a/src/test/java/org/opentripplanner/test/support/JsonAssertions.java +++ b/src/test/java/org/opentripplanner/test/support/JsonAssertions.java @@ -32,10 +32,11 @@ public static void assertEqualJson(String expected, JsonNode actual) { assertEquals( exp, actualNode, - "Expected '%s' but actual was '%s'".formatted( - JsonSupport.prettyPrint(exp), - JsonSupport.prettyPrint(actualNode) - ) + () -> + "Expected '%s' but actual was '%s'".formatted( + JsonSupport.prettyPrint(exp), + JsonSupport.prettyPrint(actualNode) + ) ); } catch (JsonProcessingException e) { throw new RuntimeException(e);