docs: public int delete(User registrar) throws IdentityException, InvalidArgumentException {
          if (this.deleted) {
              throw new IdentityException("Identity has been deleted");
          }
          if (registrar == null) {
              throw new InvalidArgumentException("Registrar should be a valid member");
          }
  
          String deleteURL = "";
          try {
              deleteURL = client.getURL(HFCA_IDENTITY + "/" + getEnrollmentId());
              logger.debug(format("identity  url: %s, registrar: %s", deleteURL, registrar.getName()));
  
              JsonObject result = client.httpDelete(deleteURL, registrar);
  
              statusCode = result.getInt("statusCode");
              if (statusCode < 400) {
                  getHFCAIdentity(result);
                  logger.debug(format("identity  url: %s, registrar: %s done.", deleteURL, registrar));
              }
              this.deleted = true;
              return statusCode;
          } catch (HTTPException e) {
              String msg = format("[Code: %d] - Error while deleting user '%s' from url '%s': %s", e.getStatusCode(), getEnrollmentId(), deleteURL, e.getMessage());
              IdentityException identityException = new IdentityException(msg, e);
              logger.error(msg);
              throw identityException;
          } catch (Exception e) {
              String msg = format("Error while deleting user '%s' from url '%s':  %s", getEnrollmentId(), deleteURL, e.getMessage());
              IdentityException identityException = new IdentityException(msg, e);
              logger.error(msg);
              throw identityException;
          }
      }