@Test
public void testGrpcCodeToStatusCode() {

  testCodes(StatusCode.Code.OK, Status.Code.OK);
  testCodes(StatusCode.Code.CANCELLED, Status.Code.CANCELLED);
  testCodes(StatusCode.Code.UNKNOWN, Status.Code.UNKNOWN);
  testCodes(StatusCode.Code.INVALID_ARGUMENT, Status.Code.INVALID_ARGUMENT);
  testCodes(StatusCode.Code.DEADLINE_EXCEEDED, Status.Code.DEADLINE_EXCEEDED);
  testCodes(StatusCode.Code.NOT_FOUND, Status.Code.NOT_FOUND);
  testCodes(StatusCode.Code.ALREADY_EXISTS, Status.Code.ALREADY_EXISTS);
  testCodes(StatusCode.Code.PERMISSION_DENIED, Status.Code.PERMISSION_DENIED);
  testCodes(StatusCode.Code.RESOURCE_EXHAUSTED, Status.Code.RESOURCE_EXHAUSTED);
  testCodes(StatusCode.Code.FAILED_PRECONDITION, Status.Code.FAILED_PRECONDITION);
  testCodes(StatusCode.Code.ABORTED, Status.Code.ABORTED);
  testCodes(StatusCode.Code.OUT_OF_RANGE, Status.Code.OUT_OF_RANGE);
  testCodes(StatusCode.Code.UNIMPLEMENTED, Status.Code.UNIMPLEMENTED);
  testCodes(StatusCode.Code.INTERNAL, Status.Code.INTERNAL);
  testCodes(StatusCode.Code.UNAVAILABLE, Status.Code.UNAVAILABLE);
  testCodes(StatusCode.Code.DATA_LOSS, Status.Code.DATA_LOSS);
  testCodes(StatusCode.Code.UNAUTHENTICATED, Status.Code.UNAUTHENTICATED);
}