@DataProvider(value = { "true | true | true", "true | false | true", "false | true | true", "false | false | true", "true | true | false", "true | false | false", "false | true | false", "false | false | false", }, splitBy = "\\|") @Test public void pair_constructor_sets_fields_as_expected( boolean nullSpanStack, boolean nullMdcInfo, boolean useStaticFactory ) { Deque<Span> spanStackMock = (nullSpanStack) ? null : mock(Deque.class); Map<String, String> mdcInfoMock = (nullMdcInfo) ? null : mock(Map.class); BiConsumerWithTracing instance = (useStaticFactory) ? withTracing(biConsumerMock, Pair.of(spanStackMock, mdcInfoMock)) : new BiConsumerWithTracing(biConsumerMock, Pair.of(spanStackMock, mdcInfoMock) ); assertThat(instance.origBiConsumer).isSameAs(biConsumerMock); assertThat(instance.spanStackForExecution).isEqualTo(spanStackMock); assertThat(instance.mdcContextMapForExecution).isEqualTo(mdcInfoMock); }
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);  }