diff --git a/spring-core-test/src/main/java/org/springframework/aot/agent/RecordedInvocation.java b/spring-core-test/src/main/java/org/springframework/aot/agent/RecordedInvocation.java index cf31f53fc0..239abc12ac 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/agent/RecordedInvocation.java +++ b/spring-core-test/src/main/java/org/springframework/aot/agent/RecordedInvocation.java @@ -170,6 +170,12 @@ public final class RecordedInvocation { return this.instrumentedMethod.matcher(this).test(hints); } + @Override + public String toString() { + return String.format("<%s> invocation of <%s> on type <%s> with arguments %s", + getHintType().hintClassName(), getMethodReference(), getInstanceTypeReference(), getArguments()); + } + /** * Builder for {@link RecordedInvocation}. */ diff --git a/spring-core-test/src/main/java/org/springframework/aot/agent/RuntimeHintsAgent.java b/spring-core-test/src/main/java/org/springframework/aot/agent/RuntimeHintsAgent.java index a0978531a5..cc9fbecc41 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/agent/RuntimeHintsAgent.java +++ b/spring-core-test/src/main/java/org/springframework/aot/agent/RuntimeHintsAgent.java @@ -33,7 +33,7 @@ import org.springframework.util.StringUtils; * option, as a comma-separated list of packages to instrument prefixed with {@code "+"} * and packages to ignore prefixed with {@code "-"}: *
- * -javaagent:/path/to/spring-runtimehints-agent.jar=+org.springframework,-io.spring,+org.example") + * -javaagent:/path/to/spring-core-test.jar=+org.springframework,-io.spring,+org.example") ** * @author Brian Clozel diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/agent/RuntimeHintsInvocationsAssert.java b/spring-core-test/src/main/java/org/springframework/aot/test/agent/RuntimeHintsInvocationsAssert.java index c29e6aa050..06b46f26c8 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/agent/RuntimeHintsInvocationsAssert.java +++ b/spring-core-test/src/main/java/org/springframework/aot/test/agent/RuntimeHintsInvocationsAssert.java @@ -23,6 +23,7 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import org.assertj.core.api.AbstractAssert; +import org.assertj.core.api.ListAssert; import org.assertj.core.error.BasicErrorMessageFactory; import org.assertj.core.error.ErrorMessageFactory; @@ -68,7 +69,7 @@ public class RuntimeHintsInvocationsAssert extends AbstractAssert