@Test public void should_increment_dropped_spans_when_message_sending_was_successful() throws Exception { Span span1 = Span.builder().build(); Span span2 = Span.builder().build(); Message<Spans> message = MessageBuilder.withPayload(new Spans(null, Arrays.asList(span1, span2))).build(); this.tracerIgnoringChannelInterceptor.afterSendCompletion( message, this.messageChannel, false, null); BDDMockito.then(this.spanMetricReporter).should().incrementDroppedSpans(2); }