@Test public void constructors_throw_exception_if_passed_null_operator() { final Deque<Span> spanStackMock = mock(Deque.class); final Map<String, String> mdcInfoMock = mock(Map.class); assertThat(catchThrowable(() -> new BiConsumerWithTracing(null))) .isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(() -> withTracing(null))) .isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(() -> new BiConsumerWithTracing(null, Pair.of(spanStackMock, mdcInfoMock)))) .isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(() -> withTracing(null, Pair.of(spanStackMock, mdcInfoMock)))) .isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(() -> new BiConsumerWithTracing(null, spanStackMock, mdcInfoMock))) .isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(() -> withTracing(null, spanStackMock, mdcInfoMock))) .isInstanceOf(IllegalArgumentException.class); }
public static <T, U> BiConsumerWithTracing<T, U> withTracing(BiConsumer<T, U> origBiConsumer) { return new BiConsumerWithTracing<>(origBiConsumer); }
BiConsumerWithTracing implements BiConsumer<T, U> { public static <T, U> BiConsumerWithTracing<T, U> withTracing(BiConsumer<T, U> origBiConsumer) { return new BiConsumerWithTracing<>(origBiConsumer); } }
BiConsumerWithTracing implements BiConsumer<T, U> { public static <T, U> BiConsumerWithTracing<T, U> withTracing(BiConsumer<T, U> origBiConsumer) { return new BiConsumerWithTracing<>(origBiConsumer); } BiConsumerWithTracing(BiConsumer<T, U> origBiConsumer);  BiConsumerWithTracing(BiConsumer<T, U> origBiConsumer,
                                 Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  BiConsumerWithTracing(BiConsumer<T, U> origBiConsumer,
                                 Deque<Span> spanStackForExecution,
                                 Map<String, String> mdcContextMapForExecution); }
BiConsumerWithTracing implements BiConsumer<T, U> { public static <T, U> BiConsumerWithTracing<T, U> withTracing(BiConsumer<T, U> origBiConsumer) { return new BiConsumerWithTracing<>(origBiConsumer); } BiConsumerWithTracing(BiConsumer<T, U> origBiConsumer);  BiConsumerWithTracing(BiConsumer<T, U> origBiConsumer,
                                 Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  BiConsumerWithTracing(BiConsumer<T, U> origBiConsumer,
                                 Deque<Span> spanStackForExecution,
                                 Map<String, String> mdcContextMapForExecution); static BiConsumerWithTracing<T, U> withTracing(BiConsumer<T, U> origBiConsumer); static BiConsumerWithTracing<T, U> withTracing(
        BiConsumer<T, U> origBiConsumer,
        Pair<Deque<Span>, Map<String, String>> originalThreadInfo
    ); static BiConsumerWithTracing<T, U> withTracing(BiConsumer<T, U> origBiConsumer,
                                                                 Deque<Span> spanStackForExecution,
                                                                 Map<String, String> mdcContextMapForExecution); @Override void accept(T t, U u); }
BiConsumerWithTracing implements BiConsumer<T, U> { public static <T, U> BiConsumerWithTracing<T, U> withTracing(BiConsumer<T, U> origBiConsumer) { return new BiConsumerWithTracing<>(origBiConsumer); } BiConsumerWithTracing(BiConsumer<T, U> origBiConsumer);  BiConsumerWithTracing(BiConsumer<T, U> origBiConsumer,
                                 Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  BiConsumerWithTracing(BiConsumer<T, U> origBiConsumer,
                                 Deque<Span> spanStackForExecution,
                                 Map<String, String> mdcContextMapForExecution); static BiConsumerWithTracing<T, U> withTracing(BiConsumer<T, U> origBiConsumer); static BiConsumerWithTracing<T, U> withTracing(
        BiConsumer<T, U> origBiConsumer,
        Pair<Deque<Span>, Map<String, String>> originalThreadInfo
    ); static BiConsumerWithTracing<T, U> withTracing(BiConsumer<T, U> origBiConsumer,
                                                                 Deque<Span> spanStackForExecution,
                                                                 Map<String, String> mdcContextMapForExecution); @Override void accept(T t, U u);  }