@Test
public void testExternalOperationCancel() {

  Mockito.reset(innerCallable, tracerFactory);
  when(tracerFactory.newTracer(
          any(ApiTracer.class), any(SpanName.class), eq(OperationType.Unary)))
      .thenReturn(tracer);
  SettableApiFuture<Void> innerCancelResult = SettableApiFuture.create();
  when(innerCallable.cancel(anyString(), any(ApiCallContext.class)))
      .thenReturn(innerCancelResult);
  tracedOperationCallable.cancel("some external operation", callContext);
  verify(tracerFactory, times(1))
      .newTracer(
          parentTracer,
          SpanName.of(SPAN_NAME.getClientName(), SPAN_NAME.getMethodName() + ".Cancel"),
          OperationType.Unary);
}