1414import static io .opentelemetry .instrumentation .testing .junit .http .ServerEndpoint .QUERY_PARAM ;
1515import static io .opentelemetry .instrumentation .testing .junit .http .ServerEndpoint .REDIRECT ;
1616import static io .opentelemetry .sdk .testing .assertj .OpenTelemetryAssertions .assertThat ;
17- import static io .opentelemetry .sdk .testing .assertj .OpenTelemetryAssertions .equalTo ;
17+ import static io .opentelemetry .sdk .testing .assertj .OpenTelemetryAssertions .satisfies ;
1818
1919import grails .boot .GrailsApp ;
2020import grails .boot .config .GrailsAutoConfiguration ;
3737import java .util .Locale ;
3838import java .util .Map ;
3939import java .util .function .Consumer ;
40- import org .apache .catalina .connector .ResponseFacade ;
4140import org .junit .jupiter .api .extension .RegisterExtension ;
4241import org .springframework .boot .autoconfigure .SpringBootApplication ;
4342import org .springframework .boot .autoconfigure .web .ServerProperties ;
@@ -175,9 +174,8 @@ public SpanDataAssert assertResponseSpan(
175174 span .hasKind (SpanKind .INTERNAL )
176175 .satisfies (spanData -> assertThat (spanData .getName ()).endsWith ("." + methodName ))
177176 .hasAttributesSatisfyingExactly (
178- equalTo (
179- CodeIncubatingAttributes .CODE_FUNCTION_NAME ,
180- ResponseFacade .class .getName () + "." + methodName ));
177+ satisfies (
178+ CodeIncubatingAttributes .CODE_FUNCTION_NAME , v -> v .endsWith ("." + methodName )));
181179 return span ;
182180 }
183181
@@ -198,9 +196,9 @@ public List<Consumer<SpanDataAssert>> errorPageSpanAssertions(
198196 span .satisfies (spanData -> assertThat (spanData .getName ()).endsWith (".sendError" ))
199197 .hasKind (SpanKind .INTERNAL )
200198 .hasAttributesSatisfyingExactly (
201- equalTo (
199+ satisfies (
202200 CodeIncubatingAttributes .CODE_FUNCTION_NAME ,
203- ResponseFacade . class . getName () + ".sendError" )));
201+ v -> v . endsWith ( ".sendError" ) )));
204202 }
205203 return spanAssertions ;
206204 }
0 commit comments