@Test
public void testBadContext() {

  streamingCallable =
      GrpcCallableFactory.createServerStreamingCallable(
          GrpcCallSettings.create(METHOD_SERVER_STREAMING_RECOGNIZE),
          streamingCallSettings,
          clientContext
              .toBuilder()
              .setDefaultCallContext(FakeCallContext.createDefault())
              .build());
  CountDownLatch latch = new CountDownLatch(1);
  MoneyObserver observer = new MoneyObserver(true, latch);
  try {
    streamingCallable.call(DEFAULT_REQUEST, observer);
    Assert.fail("Callable should have thrown an exception");
  } catch (IllegalArgumentException expected) {
    Truth.assertThat(expected)
        .hasMessageThat()
        .contains("context must be an instance of GrpcCallContext");
  }
}