@DataProvider(value = { "true", "false" }) @Test public void kitchen_sink_constructor_sets_fields_as_expected(boolean useStaticFactory) { Deque<Span> spanStackMock = mock(Deque.class); Map<String, String> mdcInfoMock = mock(Map.class); RunnableWithTracing instance = (useStaticFactory) ? withTracing(runnableMock, spanStackMock, mdcInfoMock) : new RunnableWithTracing(runnableMock, spanStackMock, mdcInfoMock); assertThat(instance.origRunnable).isSameAs(runnableMock); assertThat(instance.spanStackForExecution).isEqualTo(spanStackMock); assertThat(instance.mdcContextMapForExecution).isEqualTo(mdcInfoMock); }
public static RunnableWithTracing withTracing(Runnable origRunnable) { return new RunnableWithTracing(origRunnable); }
RunnableWithTracing implements Runnable { public static RunnableWithTracing withTracing(Runnable origRunnable) { return new RunnableWithTracing(origRunnable); } }
RunnableWithTracing implements Runnable { public static RunnableWithTracing withTracing(Runnable origRunnable) { return new RunnableWithTracing(origRunnable); } RunnableWithTracing(Runnable origRunnable);  RunnableWithTracing(Runnable origRunnable,
                               Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  RunnableWithTracing(Runnable origRunnable,
                               Deque<Span> spanStackForExecution,
                               Map<String, String> mdcContextMapForExecution); }
RunnableWithTracing implements Runnable { public static RunnableWithTracing withTracing(Runnable origRunnable) { return new RunnableWithTracing(origRunnable); } RunnableWithTracing(Runnable origRunnable);  RunnableWithTracing(Runnable origRunnable,
                               Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  RunnableWithTracing(Runnable origRunnable,
                               Deque<Span> spanStackForExecution,
                               Map<String, String> mdcContextMapForExecution); static RunnableWithTracing withTracing(Runnable origRunnable); static RunnableWithTracing withTracing(Runnable origRunnable,
                                                   Pair<Deque<Span>, Map<String, String>> originalThreadInfo); static RunnableWithTracing withTracing(Runnable origRunnable,
                                                   Deque<Span> spanStackForExecution,
                                                   Map<String, String> mdcContextMapForExecution); @Override @SuppressWarnings("deprecation") void run(); }
RunnableWithTracing implements Runnable { public static RunnableWithTracing withTracing(Runnable origRunnable) { return new RunnableWithTracing(origRunnable); } RunnableWithTracing(Runnable origRunnable);  RunnableWithTracing(Runnable origRunnable,
                               Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  RunnableWithTracing(Runnable origRunnable,
                               Deque<Span> spanStackForExecution,
                               Map<String, String> mdcContextMapForExecution); static RunnableWithTracing withTracing(Runnable origRunnable); static RunnableWithTracing withTracing(Runnable origRunnable,
                                                   Pair<Deque<Span>, Map<String, String>> originalThreadInfo); static RunnableWithTracing withTracing(Runnable origRunnable,
                                                   Deque<Span> spanStackForExecution,
                                                   Map<String, String> mdcContextMapForExecution); @Override @SuppressWarnings("deprecation") void run();  }