test_class.declarator: sut
test_class.modifier: private
test_class.original_string: private DefaultStrategyFinder sut;
test_class.type: DefaultStrategyFinder
test_class.var_name: sut
test_class.declarator: messageMapper
test_class.modifier: private
test_class.original_string: private TypesForMessageMapper messageMapper;
test_class.type: TypesForMessageMapper
test_class.var_name: messageMapper
test_class.file: saga-lib/src/test/java/com/codebullets/sagalib/processing/DefaultStrategyFinderTest.java
test_class.identifier: DefaultStrategyFinderTest
test_case.body: @Test
      public void find_timeout_returnsTimeoutStrategy() {
          // given
          Timeout timeout = Timeout.create(null, null, null, null);
          LookupContext context = mockMessageContext(timeout);
  
          // when
          Collection<ResolveStrategy> strategies = sut.find(context);
  
          // then
          assertThat("Expected a timeout strategy.", strategies, hasItem(isA(TimeoutResolveStrategy.class)));
      }
test_case.class_method_signature: DefaultStrategyFinderTest.find_timeout_returnsTimeoutStrategy()
test_case.full_signature: @Test public void find_timeout_returnsTimeoutStrategy()
test_case.identifier: find_timeout_returnsTimeoutStrategy
test_case.invocations: create mockMessageContext find assertThat hasItem isA
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void find_timeout_returnsTimeoutStrategy()
focal_class.declarator: typesForMessageMapper
focal_class.modifier: private final
focal_class.original_string: private final TypesForMessageMapper typesForMessageMapper;
focal_class.type: TypesForMessageMapper
focal_class.var_name: typesForMessageMapper
focal_class.declarator: instanceFactory
focal_class.modifier: private final
focal_class.original_string: private final SagaInstanceFactory instanceFactory;
focal_class.type: SagaInstanceFactory
focal_class.var_name: instanceFactory
focal_class.declarator: keyExtractor
focal_class.modifier: private final
focal_class.original_string: private final KeyExtractor keyExtractor;
focal_class.type: KeyExtractor
focal_class.var_name: keyExtractor
focal_class.declarator: stateStorage
focal_class.modifier: private final
focal_class.original_string: private final StateStorage stateStorage;
focal_class.type: StateStorage
focal_class.var_name: stateStorage
focal_class.file: saga-lib/src/main/java/com/codebullets/sagalib/processing/DefaultStrategyFinder.java
focal_class.identifier: DefaultStrategyFinder
focal_class.interfaces: implements StrategyFinder
focal_class.class_method_signature: DefaultStrategyFinder.DefaultStrategyFinder(
              final TypesForMessageMapper typesForMessageMapper,
              final SagaInstanceFactory instanceFactory,
              final KeyExtractor keyExtractor,
              final StateStorage stateStorage)
focal_class.full_signature: @Inject public  DefaultStrategyFinder(
              final TypesForMessageMapper typesForMessageMapper,
              final SagaInstanceFactory instanceFactory,
              final KeyExtractor keyExtractor,
              final StateStorage stateStorage)
focal_class.identifier: DefaultStrategyFinder
focal_class.modifiers: @Inject public
focal_class.parameters: (
              final TypesForMessageMapper typesForMessageMapper,
              final SagaInstanceFactory instanceFactory,
              final KeyExtractor keyExtractor,
              final StateStorage stateStorage)
focal_class.signature:  DefaultStrategyFinder(
              final TypesForMessageMapper typesForMessageMapper,
              final SagaInstanceFactory instanceFactory,
              final KeyExtractor keyExtractor,
              final StateStorage stateStorage)
focal_class.class_method_signature: DefaultStrategyFinder.find(final LookupContext context)
focal_class.full_signature: @Override public Collection<ResolveStrategy> find(final LookupContext context)
focal_class.identifier: find
focal_class.modifiers: @Override public
focal_class.parameters: (final LookupContext context)
focal_class.return: Collection<ResolveStrategy>
focal_class.signature: Collection<ResolveStrategy> find(final LookupContext context)
focal_class.class_method_signature: DefaultStrategyFinder.checkAnnotatedMethodTypes(final LookupContext context)
focal_class.full_signature: private Collection<ResolveStrategy> checkAnnotatedMethodTypes(final LookupContext context)
focal_class.identifier: checkAnnotatedMethodTypes
focal_class.modifiers: private
focal_class.parameters: (final LookupContext context)
focal_class.return: Collection<ResolveStrategy>
focal_class.signature: Collection<ResolveStrategy> checkAnnotatedMethodTypes(final LookupContext context)
focal_method.body: @Override
      public Collection<ResolveStrategy> find(final LookupContext context) {
          Collection<ResolveStrategy> strategies = new ArrayList<>();
  
          // timeout is special, saga id is known resulting in a simpler strategy without
          // having to read instance keys or searching by instance key in the state storage.
          if (context.message() instanceof Timeout) {
              strategies.add(new TimeoutResolveStrategy(typesForMessageMapper, instanceFactory, stateStorage));
          } else {
              strategies.addAll(checkAnnotatedMethodTypes(context));
          }
  
          return strategies;
      }
focal_method.class_method_signature: DefaultStrategyFinder.find(final LookupContext context)
focal_method.full_signature: @Override public Collection<ResolveStrategy> find(final LookupContext context)
focal_method.identifier: find
focal_method.invocations: message add addAll checkAnnotatedMethodTypes
focal_method.modifiers: @Override public
focal_method.parameters: (final LookupContext context)
focal_method.return: Collection<ResolveStrategy>
focal_method.signature: Collection<ResolveStrategy> find(final LookupContext context)