Can a child workflow/activity be triggered from a Workflow CancellationScope in the exception block?

Thanku again.

I am trying to unit test the same scenario, cancel scenario with a mock for the CleanupWorkflow.

I get the error

java.lang.IllegalStateException: Operation allowed only while eventLoop is running

Sample code is here :

I have used mocking workflow example from here - https://github.com/temporalio/samples-java/blob/986f4965ca9799af36784f80e28a7a04c0e6f9eb/src/test/java/io/temporal/samples/hello/HelloChildTest.java

Also get this error Argument passed to verify() should be a mock but is null!