code: public int addDocumentHeader(DocumentHeader header) {
          if (header == null) {
              throw new InvalidArgument("header is null");
          }
  
          headers.add(header);
          return headers.size() - 1;
      }
docs: Adds a document to the {@code headers} set. The insertion index is
  maintained in the {@code headers} list.
  
  @param header {@link DocumentHeader}, the header to add, which cannot be
  null
  @return {@code int}, the index of the added document header, which will
  be &gt;= 0
  @throws InvalidArgument Thrown if {@code header} is null