GrpcClientResponse extends RpcClientResponse implements GrpcResponse { @Override @Nullable public String errorCode() { if (status.isOk()) return null; return status.getCode().name(); } GrpcClientResponse(GrpcClientRequest request, Metadata headers, Status status,
      Metadata trailers); @Override Status unwrap(); @Override GrpcClientRequest request(); @Override @Nullable Throwable error(); @Override @Nullable String errorCode(); @Override Metadata headers(); @Override Status status(); @Override Metadata trailers();  }
@Test public void errorCode_nullWhenOk() { status = Status.OK; GrpcClientResponse response = new GrpcClientResponse(request, headers, status, trailers); assertThat(response.errorCode()).isNull(); }
@Test public void errorCode() { assertThat(response.errorCode()).isEqualTo("CANCELLED"); }