def METHOD_NAME(self, sleep_mock, time_mock):
    exception_handler_mock = MagicMock()
    time_mock.return_value = 1001
    flow1 = MagicMock()
    flow2 = MagicMock()
    flow3 = MagicMock()
    task1 = DelayedSyncFlowTask(flow1, False, 1000, 0)
    task2 = DelayedSyncFlowTask(flow2, False, 1000, 0)
    task3 = DelayedSyncFlowTask(flow3, False, 1000, 0)
    result1 = SyncFlowResult(flow1, [flow3])
    future1 = MagicMock()
    future2 = MagicMock()
    future3 = MagicMock()
    exception1 = MagicMock(spec=Exception)
    sync_flow_exception = MagicMock(spec=SyncFlowException)
    sync_flow_exception.sync_flow = flow2
    sync_flow_exception.exception = exception1
    future1.done.side_effect = [False, False, True]
    future1.exception.return_value = None
    future1.result.return_value = result1
    future2.done.side_effect = [False, False, False, True]
    future2.exception.return_value = sync_flow_exception
    future3.done.side_effect = [False, False, False, True]
    future3.exception.return_value = None
    self.thread_pool_executor.submit = MagicMock()
    self.thread_pool_executor.submit.side_effect = [future1, future2, future3]
    self.executor._flow_queue.put(task1)
    self.executor._flow_queue.put(task2)
    self.executor.add_sync_flow = MagicMock()
    self.executor.add_sync_flow.side_effect = lambda x: self.executor._flow_queue.put(task3)
    self.executor.should_stop = MagicMock()
    self.executor.should_stop.side_effect = [
        False,
        False,
        False,
        False,
        False,
        False,
        False,
        False,
        False,
        False,
        True,
    ]
    self.executor.execute(exception_handler=exception_handler_mock)
    self.thread_pool_executor.submit.assert_has_calls(
        [
            call(SyncFlowExecutor._sync_flow_execute_wrapper, flow1),
            call(SyncFlowExecutor._sync_flow_execute_wrapper, flow2),
            call(SyncFlowExecutor._sync_flow_execute_wrapper, flow3),
        ]
    )
    self.executor.add_sync_flow.assert_called_once_with(flow3)
    exception_handler_mock.assert_called_once_with(sync_flow_exception)
    self.assertEqual(len(sleep_mock.mock_calls), 10)