TestWorkflowExtension fails workflow when Workflow.sleep(duration)

Hello. I am using TestWorkflowExtension to run tests for my workflow.

Here is how I initialized TestWorkflowExtension

    public static final TestWorkflowExtension testWorkflowExtension =

Inside the workflow’s execute(), I have a Workflow.sleep(duration) where the duration positive. However, when this line is called, an InvocationTargetException is thrown. How can I avoid this exception?

Hey @Theresa_Chen do you mind to share the stack trace?