code: private static AuthorizationStatus convert(AuthorizationResultStatus status) {
          AuthorizationStatus result;
  
          switch (status) {
              case ACCEPTED:
                  result = AuthorizationStatus.ACCEPTED;
                  break;
              case BLOCKED:
                  result = AuthorizationStatus.BLOCKED;
                  break;
              case EXPIRED:
                  result = AuthorizationStatus.EXPIRED;
                  break;
              case INVALID:
                  result = AuthorizationStatus.INVALID;
                  break;
              default:
                  throw new AssertionError("AuthorizationResultStatus has unknown status: " + status);
          }
  
          return result;
      }
docs: Converts a {@code AuthorizationResultStatus} to a {@code AuthorizationStatus}. Throws an assertion error is the
  status is unknown.
  
  @param status status to convert.
  @return converted status.