@Test public void find_continueSagaMessage_returnsContinueSagaStrategy() { Object message = mockContinueMessage(); LookupContext context = mockMessageContext(message); Collection<ResolveStrategy> strategies = sut.find(context); assertThat("Expected a continue all saga strategy.", strategies, hasItem(isA(ContinueAllStrategy.class))); }
@Override public Collection<ResolveStrategy> find(final LookupContext context) { Collection<ResolveStrategy> strategies = new ArrayList<>(); if (context.message() instanceof Timeout) { strategies.add(new TimeoutResolveStrategy(typesForMessageMapper, instanceFactory, stateStorage)); } else { strategies.addAll(checkAnnotatedMethodTypes(context)); } return strategies; }
DefaultStrategyFinder implements StrategyFinder { @Override public Collection<ResolveStrategy> find(final LookupContext context) { Collection<ResolveStrategy> strategies = new ArrayList<>(); if (context.message() instanceof Timeout) { strategies.add(new TimeoutResolveStrategy(typesForMessageMapper, instanceFactory, stateStorage)); } else { strategies.addAll(checkAnnotatedMethodTypes(context)); } return strategies; } }
DefaultStrategyFinder implements StrategyFinder { @Override public Collection<ResolveStrategy> find(final LookupContext context) { Collection<ResolveStrategy> strategies = new ArrayList<>(); if (context.message() instanceof Timeout) { strategies.add(new TimeoutResolveStrategy(typesForMessageMapper, instanceFactory, stateStorage)); } else { strategies.addAll(checkAnnotatedMethodTypes(context)); } return strategies; } @Inject  DefaultStrategyFinder(
            final TypesForMessageMapper typesForMessageMapper,
            final SagaInstanceFactory instanceFactory,
            final KeyExtractor keyExtractor,
            final StateStorage stateStorage); }
DefaultStrategyFinder implements StrategyFinder { @Override public Collection<ResolveStrategy> find(final LookupContext context) { Collection<ResolveStrategy> strategies = new ArrayList<>(); if (context.message() instanceof Timeout) { strategies.add(new TimeoutResolveStrategy(typesForMessageMapper, instanceFactory, stateStorage)); } else { strategies.addAll(checkAnnotatedMethodTypes(context)); } return strategies; } @Inject  DefaultStrategyFinder(
            final TypesForMessageMapper typesForMessageMapper,
            final SagaInstanceFactory instanceFactory,
            final KeyExtractor keyExtractor,
            final StateStorage stateStorage); @Override Collection<ResolveStrategy> find(final LookupContext context); }
DefaultStrategyFinder implements StrategyFinder { @Override public Collection<ResolveStrategy> find(final LookupContext context) { Collection<ResolveStrategy> strategies = new ArrayList<>(); if (context.message() instanceof Timeout) { strategies.add(new TimeoutResolveStrategy(typesForMessageMapper, instanceFactory, stateStorage)); } else { strategies.addAll(checkAnnotatedMethodTypes(context)); } return strategies; } @Inject  DefaultStrategyFinder(
            final TypesForMessageMapper typesForMessageMapper,
            final SagaInstanceFactory instanceFactory,
            final KeyExtractor keyExtractor,
            final StateStorage stateStorage); @Override Collection<ResolveStrategy> find(final LookupContext context);  }