test_class.file: services/connectivity/messaging/src/test/java/org/eclipse/ditto/services/connectivity/messaging/DroppedTest.java
test_class.identifier: DroppedTest
test_case.body: @Test
      public void monitorAndAcknowledge() {
          final ConnectionMonitor droppedMonitor = Mockito.mock(ConnectionMonitor.class);
          final OutboundSignal.Mapped mappedOutboundSignal = Mockito.mock(OutboundSignal.Mapped.class);
          final Signal source = Mockito.mock(Signal.class);
          Mockito.when(mappedOutboundSignal.getSource()).thenReturn(source);
          final GenericTarget genericTarget = Mockito.mock(GenericTarget.class);
          final String address = "742 Evergreen Terrace";
          Mockito.when(genericTarget.getAddress()).thenReturn(address);
          final SendingContext sendingContext = SendingContext.newBuilder()
                  .mappedOutboundSignal(mappedOutboundSignal)
                  .externalMessage(Mockito.mock(ExternalMessage.class))
                  .genericTarget(genericTarget)
                  .publishedMonitor(Mockito.mock(ConnectionMonitor.class))
                  .acknowledgedMonitor(Mockito.mock(ConnectionMonitor.class))
                  .droppedMonitor(droppedMonitor)
                  .autoAckTarget(Mockito.mock(Target.class))
                  .build();
  
          final Dropped underTest = new Dropped(sendingContext);
  
          final Optional<CompletionStage<CommandResponse>> result = underTest.monitorAndAcknowledge(null);
  
          assertThat(result).isEmpty();
          Mockito.verify(droppedMonitor).success(source, "Signal dropped, target address unresolved: {0}", address);
      }
test_case.class_method_signature: DroppedTest.monitorAndAcknowledge()
test_case.full_signature: @Test public void monitorAndAcknowledge()
test_case.identifier: monitorAndAcknowledge
test_case.invocations: mock mock mock thenReturn when getSource mock thenReturn when getAddress build autoAckTarget droppedMonitor acknowledgedMonitor publishedMonitor genericTarget externalMessage mappedOutboundSignal newBuilder mock mock mock mock monitorAndAcknowledge isEmpty assertThat success verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void monitorAndAcknowledge()
focal_class.declarator: sendingContext
focal_class.modifier: private final
focal_class.original_string: private final SendingContext sendingContext;
focal_class.type: SendingContext
focal_class.var_name: sendingContext
focal_class.file: services/connectivity/messaging/src/main/java/org/eclipse/ditto/services/connectivity/messaging/Dropped.java
focal_class.identifier: Dropped
focal_class.interfaces: implements SendingOrDropped
focal_class.class_method_signature: Dropped.Dropped(final SendingContext sendingContext)
focal_class.full_signature:   Dropped(final SendingContext sendingContext)
focal_class.identifier: Dropped
focal_class.parameters: (final SendingContext sendingContext)
focal_class.signature:  Dropped(final SendingContext sendingContext)
focal_class.class_method_signature: Dropped.monitorAndAcknowledge(
              final ExceptionToAcknowledgementConverter exceptionToAcknowledgementConverter)
focal_class.full_signature: @SuppressWarnings({"rawtypes", "java:S3740"}) @Override public Optional<CompletionStage<CommandResponse>> monitorAndAcknowledge(
              final ExceptionToAcknowledgementConverter exceptionToAcknowledgementConverter)
focal_class.identifier: monitorAndAcknowledge
focal_class.modifiers: @SuppressWarnings({"rawtypes", "java:S3740"}) @Override public
focal_class.parameters: (
              final ExceptionToAcknowledgementConverter exceptionToAcknowledgementConverter)
focal_class.return: Optional<CompletionStage<CommandResponse>>
focal_class.signature: Optional<CompletionStage<CommandResponse>> monitorAndAcknowledge(
              final ExceptionToAcknowledgementConverter exceptionToAcknowledgementConverter)
focal_method.body: @SuppressWarnings({"rawtypes", "java:S3740"})
      @Override
      public Optional<CompletionStage<CommandResponse>> monitorAndAcknowledge(
              final ExceptionToAcknowledgementConverter exceptionToAcknowledgementConverter) {
  
          final ConnectionMonitor droppedMonitor = sendingContext.getDroppedMonitor();
          final OutboundSignal.Mapped outboundSignal = sendingContext.getMappedOutboundSignal();
          final GenericTarget genericTarget = sendingContext.getGenericTarget();
          droppedMonitor.success(outboundSignal.getSource(), "Signal dropped, target address unresolved: {0}",
                  genericTarget.getAddress());
  
          return Optional.empty();
      }
focal_method.class_method_signature: Dropped.monitorAndAcknowledge(
              final ExceptionToAcknowledgementConverter exceptionToAcknowledgementConverter)
focal_method.full_signature: @SuppressWarnings({"rawtypes", "java:S3740"}) @Override public Optional<CompletionStage<CommandResponse>> monitorAndAcknowledge(
              final ExceptionToAcknowledgementConverter exceptionToAcknowledgementConverter)
focal_method.identifier: monitorAndAcknowledge
focal_method.invocations: getDroppedMonitor getMappedOutboundSignal getGenericTarget success getSource getAddress empty
focal_method.modifiers: @SuppressWarnings({"rawtypes", "java:S3740"}) @Override public
focal_method.parameters: (
              final ExceptionToAcknowledgementConverter exceptionToAcknowledgementConverter)
focal_method.return: Optional<CompletionStage<CommandResponse>>
focal_method.signature: Optional<CompletionStage<CommandResponse>> monitorAndAcknowledge(
              final ExceptionToAcknowledgementConverter exceptionToAcknowledgementConverter)