Hello. I am using TestWorkflowExtension to run tests for my workflow.
Here is how I initialized TestWorkflowExtension
public static final TestWorkflowExtension testWorkflowExtension =
TestWorkflowExtension.newBuilder()
.setWorkflowTypes(MyWorkflowImpl.class)
.setDoNotStart(true)
.build();
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?