code: public static final Transaction.PingStatus encode(final Controller.PingTxnStatus.Status status, final String logString)
              throws PingFailedException {
          Preconditions.checkNotNull(status, "status");
          Exceptions.checkNotNullOrEmpty(logString, "logString");
          Transaction.PingStatus result;
          switch (status) {
              case OK:
                  result = Transaction.PingStatus.OPEN;
                  break;
              case COMMITTED:
                  result = Transaction.PingStatus.COMMITTED;
                  break;
              case ABORTED:
                  result = Transaction.PingStatus.ABORTED;
                  break;
              default:
                  throw new PingFailedException("Ping transaction for " + logString + " failed with status " + status);
          }
          return result;
      }
docs: Returns the status of Ping Transaction.
  
  @param status     PingTxnStatus object instance.
  @param logString Description text to be logged when ping transaction status is invalid.
  @return Transaction.PingStatus
  @throws PingFailedException if status of Ping transaction operations is not successful.