test_class.declarator: argumentCaptor
test_class.modifier: @Captor
      private
test_class.original_string: @Captor
      private ArgumentCaptor<ErrorMessage> argumentCaptor;
test_class.type: ArgumentCaptor<ErrorMessage>
test_class.var_name: argumentCaptor
test_class.file: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/service/error/ErrorListenerTest.java
test_class.identifier: ErrorListenerTest
test_case.body: @Test
      void should_pass_error_message_to_consumer(@Mock ErrorMessageConsumer errorMessageConsumer) {
          // arrange
          String text = "error";
          ErrorListener errorListener = new ErrorListener(errorMessageConsumer);
          // act
          errorListener.onApplicationEvent(new ErrorEvent(this, text));
          // assert
          verify(errorMessageConsumer).consumeMessage(argumentCaptor.capture());
          ErrorMessage capturedMessage = argumentCaptor.getValue();
          assertThat(capturedMessage.text).isEqualTo(text);
          assertThat(capturedMessage.id).isNotNull();
      }
test_case.class_method_signature: ErrorListenerTest.should_pass_error_message_to_consumer(@Mock ErrorMessageConsumer errorMessageConsumer)
test_case.full_signature: @Test void should_pass_error_message_to_consumer(@Mock ErrorMessageConsumer errorMessageConsumer)
test_case.identifier: should_pass_error_message_to_consumer
test_case.invocations: onApplicationEvent consumeMessage verify capture getValue isEqualTo assertThat isNotNull assertThat
test_case.modifiers: @Test
test_case.parameters: (@Mock ErrorMessageConsumer errorMessageConsumer)
test_case.return: void
test_case.signature: void should_pass_error_message_to_consumer(@Mock ErrorMessageConsumer errorMessageConsumer)
focal_class.declarator: errorMessageConsumer
focal_class.modifier: private final
focal_class.original_string: private final ErrorMessageConsumer errorMessageConsumer;
focal_class.type: ErrorMessageConsumer
focal_class.var_name: errorMessageConsumer
focal_class.file: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/error/ErrorListener.java
focal_class.identifier: ErrorListener
focal_class.interfaces: implements ApplicationListener<ErrorEvent>
focal_class.class_method_signature: ErrorListener.ErrorListener(ErrorMessageConsumer errorMessageConsumer)
focal_class.full_signature: public  ErrorListener(ErrorMessageConsumer errorMessageConsumer)
focal_class.identifier: ErrorListener
focal_class.modifiers: public
focal_class.parameters: (ErrorMessageConsumer errorMessageConsumer)
focal_class.signature:  ErrorListener(ErrorMessageConsumer errorMessageConsumer)
focal_class.class_method_signature: ErrorListener.onApplicationEvent(ErrorEvent event)
focal_class.full_signature: @Override public void onApplicationEvent(ErrorEvent event)
focal_class.identifier: onApplicationEvent
focal_class.modifiers: @Override public
focal_class.parameters: (ErrorEvent event)
focal_class.return: void
focal_class.signature: void onApplicationEvent(ErrorEvent event)
focal_method.body: @Override
      public void onApplicationEvent(ErrorEvent event) {
          errorMessageConsumer.consumeMessage(ErrorMessage.of(UUID.randomUUID().toString(), event.message));
      }
focal_method.class_method_signature: ErrorListener.onApplicationEvent(ErrorEvent event)
focal_method.full_signature: @Override public void onApplicationEvent(ErrorEvent event)
focal_method.identifier: onApplicationEvent
focal_method.invocations: consumeMessage of toString randomUUID
focal_method.modifiers: @Override public
focal_method.parameters: (ErrorEvent event)
focal_method.return: void
focal_method.signature: void onApplicationEvent(ErrorEvent event)