@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); SuccessCallbackWithTracing instance = (useStaticFactory) ? withTracing(successCallbackMock, Pair.of(spanStackMock, mdcInfoMock)) : new SuccessCallbackWithTracing(successCallbackMock, Pair.of(spanStackMock, mdcInfoMock) ); assertThat(instance.origSuccessCallback).isSameAs(successCallbackMock); assertThat(instance.spanStackForExecution).isEqualTo(spanStackMock); assertThat(instance.mdcContextMapForExecution).isEqualTo(mdcInfoMock); }
public static <T> SuccessCallbackWithTracing<T> withTracing(SuccessCallback<T> origSuccessCallback) { return new SuccessCallbackWithTracing<>(origSuccessCallback); }
SuccessCallbackWithTracing implements SuccessCallback<T> { public static <T> SuccessCallbackWithTracing<T> withTracing(SuccessCallback<T> origSuccessCallback) { return new SuccessCallbackWithTracing<>(origSuccessCallback); } }
SuccessCallbackWithTracing implements SuccessCallback<T> { public static <T> SuccessCallbackWithTracing<T> withTracing(SuccessCallback<T> origSuccessCallback) { return new SuccessCallbackWithTracing<>(origSuccessCallback); } SuccessCallbackWithTracing(SuccessCallback<T> origSuccessCallback);  SuccessCallbackWithTracing(SuccessCallback<T> origSuccessCallback,
                                      Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  SuccessCallbackWithTracing(SuccessCallback<T> origSuccessCallback,
                                      Deque<Span> spanStackForExecution,
                                      Map<String, String> mdcContextMapForExecution); }
SuccessCallbackWithTracing implements SuccessCallback<T> { public static <T> SuccessCallbackWithTracing<T> withTracing(SuccessCallback<T> origSuccessCallback) { return new SuccessCallbackWithTracing<>(origSuccessCallback); } SuccessCallbackWithTracing(SuccessCallback<T> origSuccessCallback);  SuccessCallbackWithTracing(SuccessCallback<T> origSuccessCallback,
                                      Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  SuccessCallbackWithTracing(SuccessCallback<T> origSuccessCallback,
                                      Deque<Span> spanStackForExecution,
                                      Map<String, String> mdcContextMapForExecution); static SuccessCallbackWithTracing<T> withTracing(SuccessCallback<T> origSuccessCallback); static SuccessCallbackWithTracing<T> withTracing(SuccessCallback<T> origSuccessCallback,
                                                         Pair<Deque<Span>, Map<String, String>> originalThreadInfo); static SuccessCallbackWithTracing<T> withTracing(SuccessCallback<T> origSuccessCallback,
                                                         Deque<Span> spanStackForExecution,
                                                         Map<String, String> mdcContextMapForExecution); @Override @SuppressWarnings("deprecation") void onSuccess(T result); }
SuccessCallbackWithTracing implements SuccessCallback<T> { public static <T> SuccessCallbackWithTracing<T> withTracing(SuccessCallback<T> origSuccessCallback) { return new SuccessCallbackWithTracing<>(origSuccessCallback); } SuccessCallbackWithTracing(SuccessCallback<T> origSuccessCallback);  SuccessCallbackWithTracing(SuccessCallback<T> origSuccessCallback,
                                      Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  SuccessCallbackWithTracing(SuccessCallback<T> origSuccessCallback,
                                      Deque<Span> spanStackForExecution,
                                      Map<String, String> mdcContextMapForExecution); static SuccessCallbackWithTracing<T> withTracing(SuccessCallback<T> origSuccessCallback); static SuccessCallbackWithTracing<T> withTracing(SuccessCallback<T> origSuccessCallback,
                                                         Pair<Deque<Span>, Map<String, String>> originalThreadInfo); static SuccessCallbackWithTracing<T> withTracing(SuccessCallback<T> origSuccessCallback,
                                                         Deque<Span> spanStackForExecution,
                                                         Map<String, String> mdcContextMapForExecution); @Override @SuppressWarnings("deprecation") void onSuccess(T result);  }