@Test public void run_sagaIsStartedAndFinished_doesNotSaveSate() { when(saga.isFinished()).thenReturn(true); when(sagaInstanceInfo.isStarting()).thenReturn(true); sut.run(); verify(storage, never()).save(any(SagaState.class)); }
@Override public void run() { try { handle(); } catch (Exception e) { Throwables.throwIfUnchecked(e); throw new RuntimeException(e); } }
SagaExecutionTask implements ExecutedRunnable { @Override public void run() { try { handle(); } catch (Exception e) { Throwables.throwIfUnchecked(e); throw new RuntimeException(e); } } }
SagaExecutionTask implements ExecutedRunnable { @Override public void run() { try { handle(); } catch (Exception e) { Throwables.throwIfUnchecked(e); throw new RuntimeException(e); } } @Inject  SagaExecutionTask(
            final SagaEnvironment environment,
            final HandlerInvoker invoker,
            final Object message,
            final Map<HeaderName<?>, Object> headers,
            @Nullable final ExecutionContext parentContext); }
SagaExecutionTask implements ExecutedRunnable { @Override public void run() { try { handle(); } catch (Exception e) { Throwables.throwIfUnchecked(e); throw new RuntimeException(e); } } @Inject  SagaExecutionTask(
            final SagaEnvironment environment,
            final HandlerInvoker invoker,
            final Object message,
            final Map<HeaderName<?>, Object> headers,
            @Nullable final ExecutionContext parentContext); void handle(); @Override void run(); @Override Object message(); @Override Optional<T> getHeaderValue(final HeaderName<T> header); }
SagaExecutionTask implements ExecutedRunnable { @Override public void run() { try { handle(); } catch (Exception e) { Throwables.throwIfUnchecked(e); throw new RuntimeException(e); } } @Inject  SagaExecutionTask(
            final SagaEnvironment environment,
            final HandlerInvoker invoker,
            final Object message,
            final Map<HeaderName<?>, Object> headers,
            @Nullable final ExecutionContext parentContext); void handle(); @Override void run(); @Override Object message(); @Override Optional<T> getHeaderValue(final HeaderName<T> header);  }