@Test
public void testTokenFromContext() throws Exception {

  when(auth.getToken(any())).thenReturn(Optional.empty());
  when(client.send(any(Request.class)))
      .thenReturn(CompletableFuture.completedFuture(response(HTTP_OK)));
  var r = Context.current().withValue(GrpcContextKey.AUTHORIZATION_KEY, "foobar")
      .call(() ->
          styx.triggerWorkflowInstance("foo", "bar", "baz").toCompletableFuture());
  verify(client, timeout(30_000)).send(requestCaptor.capture());
  assertThat(r.isDone(), is(true));
  var request = requestCaptor.getValue();
  assertThat(request.header("Authorization"), is("Bearer foobar"));
}