AsyncWingtipsHelperJava7 { @Deprecated public static <U> Callable<U> callableWithTracing(Callable<U> callable) { return new CallableWithTracing<>(callable); } protected  AsyncWingtipsHelperJava7(); @Deprecated static Runnable runnableWithTracing(Runnable runnable); @Deprecated static Runnable runnableWithTracing(Runnable runnable,
                                               Pair<Deque<Span>, Map<String, String>> threadInfoToLink); @Deprecated static Runnable runnableWithTracing(Runnable runnable,
                                               Deque<Span> spanStackToLink,
                                               Map<String, String> mdcContextMapToLink); @Deprecated static Callable<U> callableWithTracing(Callable<U> callable); @Deprecated static Callable<U> callableWithTracing(Callable<U> callable,
                                                      Pair<Deque<Span>, Map<String, String>> threadInfoToLink); @Deprecated static Callable<U> callableWithTracing(Callable<U> callable,
                                                      Deque<Span> spanStackToLink,
                                                      Map<String, String> mdcContextMapToLink); @Deprecated static ExecutorServiceWithTracing executorServiceWithTracing(ExecutorService delegate); @Deprecated static ScheduledExecutorServiceWithTracing scheduledExecutorServiceWithTracing(
        ScheduledExecutorService delegate
    ); @Deprecated static TracingState linkTracingToCurrentThread(
        Pair<Deque<Span>, Map<String, String>> threadInfoToLink
    ); @Deprecated static TracingState linkTracingToCurrentThread(
        Deque<Span> spanStackToLink,
        Map<String, String> mdcContextMapToLink
    ); @Deprecated static void unlinkTracingFromCurrentThread(
        Pair<Deque<Span>, Map<String, String>> threadInfoToResetFor
    ); @Deprecated static void unlinkTracingFromCurrentThread(Deque<Span> spanStackToResetFor,
                                                      Map<String, String> mdcContextMapToResetFor);  }
@Test public void callableWithTracing_using_current_thread_info_works_as_expected() { Pair<Deque<Span>, Map<String, String>> setupInfo = setupCurrentThreadWithTracingInfo(); Callable result = callableWithTracing(callableMock); verifyCallableWithTracing(result, callableMock, setupInfo.getLeft(), setupInfo.getRight()); }
@Test public void callableWithTracing_pair_works_as_expected() { Pair<Deque<Span>, Map<String, String>> setupInfo = generateTracingInfo(); Callable result = callableWithTracing(callableMock, setupInfo); verifyCallableWithTracing(result, callableMock, setupInfo.getLeft(), setupInfo.getRight()); }
@Test public void callableWithTracing_TracingState_works_as_expected() { TracingState setupInfo = generateTracingStateInfo(); Callable result = callableWithTracing(callableMock, setupInfo); verifyCallableWithTracing(result, callableMock, setupInfo.getLeft(), setupInfo.getRight()); }
@Test public void callableWithTracing_separate_args_works_as_expected() { Pair<Deque<Span>, Map<String, String>> setupInfo = generateTracingInfo(); Callable result = callableWithTracing(callableMock, setupInfo.getLeft(), setupInfo.getRight()); verifyCallableWithTracing(result, callableMock, setupInfo.getLeft(), setupInfo.getRight()); }