I’ve tried with 3.12.4 and 3.11.2, but it won’t work.
In the sample above, you’re using the interface. In my JUnit test, I create an instance of the activity impl, and wrap that with the spy. Then add the impl to the worker. So I’m wondering if your sample isn’t valid in this case. Whatever Spy is doing to insert hooks, it’s not re-attaching the annotations.
Also, your example is fetching the annotation from the interface. If you’re on the impl class, you’d have to navigate up the class hierarchy to find the annotation, e.g.
So I stick with the original statement, Spy is stripping the annotations in it’s hackery.
I’ll also state the obvious: not a Temporal problem!