### Question:
NewRelicTokenInjectorFilter implements WebFilter { public static Optional<Token> getToken(Context context) { return context.getOrEmpty(TOKEN_CONTEXT_KEY); } NewRelicTokenInjectorFilter(Agent agent); @Override @Trace(async = true) Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain); static Optional<Token> getToken(Context context); static Optional<Transaction> getTransaction(Context context); static final String TRANSACTION_CONTEXT_KEY; static final String TOKEN_CONTEXT_KEY; }### Answer:
@Test public void getToken() { Context ctx = Context.of(NewRelicTokenInjectorFilter.TRANSACTION_CONTEXT_KEY, transaction, NewRelicTokenInjectorFilter.TOKEN_CONTEXT_KEY, token); final Optional<Token> actual = NewRelicTokenInjectorFilter.getToken(ctx); assertTrue(actual.isPresent()); assertEquals(token, actual.get()); }