anchor.diff:          after_hook = AfterHook
       } = EndedIncarnation,
   
  -    call_if_defined(AfterHook, build_mock_call_ctx(StepMockCallReport, TestCtx)),
  +    call_hook_if_defined(AfterHook, build_mock_call_ctx(StepMockCallReport, TestCtx), TestCtx),
   
       #atm_workflow_execution_incarnation_test_spec{
           lane_runs = [#atm_lane_run_execution_test_spec{
  
positive.code: 
  
  %% @private
  -spec call_if_defined(undefined | fun((term()) -> ok), term()) -> ok.
  call_if_defined(undefined, _Input) -> ok;
  call_if_defined(Fun, Input) -> Fun(Input).
  
  
  %% @private
  
negative.code:     Step =:= handle_workflow_interrupted;
      Step =:= handle_workflow_execution_stopped
  ->
      call_hook_if_defined(
          EndedIncarnation#atm_workflow_execution_incarnation_test_spec.after_hook,
          build_mock_call_ctx(StepMockCallReport, TestCtx),
          TestCtx
      ),
      TestCtx#test_ctx{ongoing_incarnations = []};
  
  