test_class.declarator: axonConfiguration
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private AxonConfiguration axonConfiguration;
test_class.type: AxonConfiguration
test_class.var_name: axonConfiguration
test_class.declarator: replayCompletionAware
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ReplayCompletionAware replayCompletionAware;
test_class.type: ReplayCompletionAware
test_class.var_name: replayCompletionAware
test_class.declarator: taskExecutor
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private TaskExecutor taskExecutor;
test_class.type: TaskExecutor
test_class.var_name: taskExecutor
test_class.declarator: eventProcessingConfiguration
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private EventProcessingConfiguration eventProcessingConfiguration;
test_class.type: EventProcessingConfiguration
test_class.var_name: eventProcessingConfiguration
test_class.declarator: switchingEventProcessor
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SwitchingEventProcessor switchingEventProcessor;
test_class.type: SwitchingEventProcessor
test_class.var_name: switchingEventProcessor
test_class.declarator: eventStore
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private EventStore eventStore;
test_class.type: EventStore
test_class.var_name: eventStore
test_class.declarator: eventGateway
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private EventGateway eventGateway;
test_class.type: EventGateway
test_class.var_name: eventGateway
test_class.declarator: startPosition
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private TrackingToken startPosition;
test_class.type: TrackingToken
test_class.var_name: startPosition
test_class.declarator: listenerRegistry
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ListenerRegistry listenerRegistry;
test_class.type: ListenerRegistry
test_class.var_name: listenerRegistry
test_class.declarator: replayEndpoint
test_class.modifier: private
test_class.original_string: private ReplayEndpoint replayEndpoint;
test_class.type: ReplayEndpoint
test_class.var_name: replayEndpoint
test_class.file: axon-support/src/test/java/engineering/everest/lhotse/axon/replay/ReplayEndpointTest.java
test_class.identifier: ReplayEndpointTest
test_case.body: @Test
      void triggerReplayWillThrowIllegalStateException_WhenNoMatchingSwitchingEventProcessorFound() {
          when(eventProcessingConfiguration.eventProcessorByProcessingGroup(
                  "foo", ReplayableEventProcessor.class)).thenReturn(Optional.empty());
          assertThrows(IllegalStateException.class, () -> replayEndpoint.startReplay(Set.of("foo"), null));
      }
test_case.class_method_signature: ReplayEndpointTest.triggerReplayWillThrowIllegalStateException_WhenNoMatchingSwitchingEventProcessorFound()
test_case.full_signature: @Test void triggerReplayWillThrowIllegalStateException_WhenNoMatchingSwitchingEventProcessorFound()
test_case.identifier: triggerReplayWillThrowIllegalStateException_WhenNoMatchingSwitchingEventProcessorFound
test_case.invocations: thenReturn when eventProcessorByProcessingGroup empty assertThrows startReplay of
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void triggerReplayWillThrowIllegalStateException_WhenNoMatchingSwitchingEventProcessorFound()
focal_class.declarator: axonConfiguration
focal_class.modifier: private final
focal_class.original_string: private final AxonConfiguration axonConfiguration;
focal_class.type: AxonConfiguration
focal_class.var_name: axonConfiguration
focal_class.declarator: replayCompletionAwares
focal_class.modifier: private final
focal_class.original_string: private final List<ReplayCompletionAware> replayCompletionAwares;
focal_class.type: List<ReplayCompletionAware>
focal_class.var_name: replayCompletionAwares
focal_class.declarator: taskExecutor
focal_class.modifier: private final
focal_class.original_string: private final TaskExecutor taskExecutor;
focal_class.type: TaskExecutor
focal_class.var_name: taskExecutor
focal_class.declarator: replayingProcessors
focal_class.modifier: private final
focal_class.original_string: private final ConcurrentHashMap<ReplayableEventProcessor, ListenerRegistry> replayingProcessors;
focal_class.type: ConcurrentHashMap<ReplayableEventProcessor, ListenerRegistry>
focal_class.var_name: replayingProcessors
focal_class.file: axon-support/src/main/java/engineering/everest/lhotse/axon/replay/ReplayEndpoint.java
focal_class.identifier: ReplayEndpoint
focal_class.class_method_signature: ReplayEndpoint.ReplayEndpoint(AxonConfiguration axonConfiguration,
                            List<ReplayCompletionAware> replayCompletionAwares,
                            TaskExecutor taskExecutor)
focal_class.full_signature: @Autowired public  ReplayEndpoint(AxonConfiguration axonConfiguration,
                            List<ReplayCompletionAware> replayCompletionAwares,
                            TaskExecutor taskExecutor)
focal_class.identifier: ReplayEndpoint
focal_class.modifiers: @Autowired public
focal_class.parameters: (AxonConfiguration axonConfiguration,
                            List<ReplayCompletionAware> replayCompletionAwares,
                            TaskExecutor taskExecutor)
focal_class.signature:  ReplayEndpoint(AxonConfiguration axonConfiguration,
                            List<ReplayCompletionAware> replayCompletionAwares,
                            TaskExecutor taskExecutor)
focal_class.class_method_signature: ReplayEndpoint.status()
focal_class.full_signature: @ReadOperation public Map<String, Object> status()
focal_class.identifier: status
focal_class.modifiers: @ReadOperation public
focal_class.parameters: ()
focal_class.return: Map<String, Object>
focal_class.signature: Map<String, Object> status()
focal_class.class_method_signature: ReplayEndpoint.startReplay(@Nullable Set<String> processingGroups,
                              @Nullable OffsetDateTime startTime)
focal_class.full_signature: @WriteOperation public void startReplay(@Nullable Set<String> processingGroups,
                              @Nullable OffsetDateTime startTime)
focal_class.identifier: startReplay
focal_class.modifiers: @WriteOperation public
focal_class.parameters: (@Nullable Set<String> processingGroups,
                              @Nullable OffsetDateTime startTime)
focal_class.return: void
focal_class.signature: void startReplay(@Nullable Set<String> processingGroups,
                              @Nullable OffsetDateTime startTime)
focal_class.class_method_signature: ReplayEndpoint.onSingleProcessorReplayCompletion(ReplayableEventProcessor processor)
focal_class.full_signature: @SuppressWarnings("PMD.CloseResource") private void onSingleProcessorReplayCompletion(ReplayableEventProcessor processor)
focal_class.identifier: onSingleProcessorReplayCompletion
focal_class.modifiers: @SuppressWarnings("PMD.CloseResource") private
focal_class.parameters: (ReplayableEventProcessor processor)
focal_class.return: void
focal_class.signature: void onSingleProcessorReplayCompletion(ReplayableEventProcessor processor)
focal_class.class_method_signature: ReplayEndpoint.isReplaying()
focal_class.full_signature: private boolean isReplaying()
focal_class.identifier: isReplaying
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isReplaying()
focal_class.class_method_signature: ReplayEndpoint.getReplayableEventProcessors()
focal_class.full_signature: private List<ReplayableEventProcessor> getReplayableEventProcessors()
focal_class.identifier: getReplayableEventProcessors
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: List<ReplayableEventProcessor>
focal_class.signature: List<ReplayableEventProcessor> getReplayableEventProcessors()
focal_class.class_method_signature: ReplayEndpoint.getReplayableEventProcessor(Set<String> processingGroups)
focal_class.full_signature: private List<ReplayableEventProcessor> getReplayableEventProcessor(Set<String> processingGroups)
focal_class.identifier: getReplayableEventProcessor
focal_class.modifiers: private
focal_class.parameters: (Set<String> processingGroups)
focal_class.return: List<ReplayableEventProcessor>
focal_class.signature: List<ReplayableEventProcessor> getReplayableEventProcessor(Set<String> processingGroups)
focal_method.body: @WriteOperation
      public void startReplay(@Nullable Set<String> processingGroups,
                              @Nullable OffsetDateTime startTime) {
          var replayableEventProcessors = processingGroups == null
                  ? getReplayableEventProcessors() : getReplayableEventProcessor(processingGroups);
  
          if (replayableEventProcessors.isEmpty()) {
              throw new IllegalStateException("No matching replayable event processors");
          }
  
          synchronized (this) {
              if (isReplaying()) {
                  throw new IllegalStateException("Cannot start replay while an existing one is running");
              }
              EventStore eventStore = axonConfiguration.eventStore();
              TrackingToken startPosition = startTime == null
                      ? eventStore.createTailToken() : eventStore.createTokenAt(startTime.toInstant());
  
              ReplayMarkerEvent replayMarkerEvent = new ReplayMarkerEvent(randomUUID());
              replayableEventProcessors.forEach(p -> {
                  replayingProcessors.put(p, p.registerReplayCompletionListener(this::onSingleProcessorReplayCompletion));
                  p.startReplay(startPosition, replayMarkerEvent);
              });
              axonConfiguration.eventGateway().publish(replayMarkerEvent);
          }
      }
focal_method.class_method_signature: ReplayEndpoint.startReplay(@Nullable Set<String> processingGroups,
                              @Nullable OffsetDateTime startTime)
focal_method.full_signature: @WriteOperation public void startReplay(@Nullable Set<String> processingGroups,
                              @Nullable OffsetDateTime startTime)
focal_method.identifier: startReplay
focal_method.invocations: getReplayableEventProcessors getReplayableEventProcessor isEmpty isReplaying eventStore createTailToken createTokenAt toInstant randomUUID forEach put registerReplayCompletionListener startReplay publish eventGateway
focal_method.modifiers: @WriteOperation public
focal_method.parameters: (@Nullable Set<String> processingGroups,
                              @Nullable OffsetDateTime startTime)
focal_method.return: void
focal_method.signature: void startReplay(@Nullable Set<String> processingGroups,
                              @Nullable OffsetDateTime startTime)