@Test
public void testStreamingErrorConversion() {

  ServerStreamingAttemptException error =
      new ServerStreamingAttemptException(
          new DeadlineExceededException(
              "timeout", null, new FakeStatusCode(Code.DEADLINE_EXCEEDED), true),
          true,
          true);
  Status opencensusStatus = OpencensusTracer.convertErrorToStatus(error);
  assertThat(opencensusStatus.getDescription()).isEqualTo("timeout");
  assertThat(opencensusStatus.getCanonicalCode()).isEqualTo(CanonicalCode.DEADLINE_EXCEEDED);
}