Context { @Nullable public Deadline getDeadline() { return DEADLINE_KEY.get(this); } private  Context(Context parent); private  Context(Context parent, Object[][] keyValueEntries); private  Context(Context parent, Object[][] keyValueEntries, boolean isCancellable); static Key<T> key(String name); static Key<T> keyWithDefault(String name, T defaultValue); static Context current(); CancellableContext withCancellation(); CancellableContext withDeadlineAfter(long duration, TimeUnit unit,
                                              ScheduledExecutorService scheduler); CancellableContext withDeadline(Deadline deadline,
      ScheduledExecutorService scheduler); Context withValue(Key<V> k1, V v1); Context withValues(Key<V1> k1, V1 v1, Key<V2> k2, V2 v2); Context withValues(Key<V1> k1, V1 v1, Key<V2> k2, V2 v2, Key<V3> k3, V3 v3); Context fork(); Context attach(); void detach(Context toAttach); boolean isCancelled(); @Nullable Throwable cancellationCause(); @Nullable Deadline getDeadline(); void addListener(final CancellationListener cancellationListener,
                          final Executor executor); void removeListener(CancellationListener cancellationListener); void run(Runnable r); V call(Callable<V> c); Runnable wrap(final Runnable r); Callable<C> wrap(final Callable<C> c); Executor fixedContextExecutor(final Executor e); static Executor currentContextExecutor(final Executor e); static final Context ROOT; }
@Test public void rootHasNoDeadline() { assertNull(Context.ROOT.getDeadline()); }