@Test
public void monitorAcknowledgementSendFailureKeepOriginalResponse() {

    final var acknowledgement = Mockito.mock(Acknowledgement.class);
    final var acknowledgementPayload = JsonObject.newBuilder().set("foo", "bar").build();
    final var acknowledgementStatusCode = HttpStatusCode.INTERNAL_SERVER_ERROR;
    Mockito.when(acknowledgement.getStatusCode()).thenReturn(acknowledgementStatusCode);
    Mockito.when(acknowledgement.getEntity()).thenReturn(Optional.of(acknowledgementPayload));
    final var expectedException = MessageSendingFailedException.newBuilder()
            .statusCode(acknowledgementStatusCode)
            .message("Received negative acknowledgement for label <" + ACKNOWLEDGEMENT_LABEL + ">.")
            .description("Payload: " + acknowledgementPayload)
            .build();
    final Sending underTest =
            new Sending(sendingContext, CompletableFuture.completedStage(acknowledgement), logger);
    final Optional<CompletionStage<CommandResponse>> result = underTest.monitorAndAcknowledge(exceptionConverter);
    Mockito.verifyNoInteractions(publishedMonitor);
    Mockito.verify(acknowledgedMonitor).failure(externalMessage, expectedException);
    assertThat(result)
            .hasValueSatisfying(resultFuture -> assertThat(resultFuture).isCompletedWithValue(acknowledgement));
}