docs: public String writePolicyToString(Policy policy) {
  
          if(!isNotNull(policy))
              throw new IllegalArgumentException("Policy cannot be null");
  
          try {
              return jsonStringOf(policy);
          } catch (Exception e) {
              String message = "Unable to serialize policy to JSON string: "
                      + e.getMessage();
              throw new IllegalArgumentException(message, e);
          } finally {
              try { writer.close(); } catch (Exception e) { }
          }
      }