private boolean hasCommandCompletedSuccessfully(final long commandId) {
    return getCommand(commandId).filter(val -> {
      final boolean isActive = val.get("active").getAsBoolean();
      if (isActive) {
        LOG.debug("command {} is still active.", commandId);
      }
      return !isActive;
    }).map(val -> {
      final boolean isSuccess = val.get("success").getAsBoolean();
      LOG.debug("command {} completed as {}.", commandId, isSuccess);
      return isSuccess;
    }).orElse(false);
  }
Return {@code true} if the {@code commandId} has finished successfully.
hbase-it/src/test/java/org/apache/hadoop/hbase/RESTApiClusterManager.java