this looks like it should atually be bytes based on:
    public SampleDocument(int payloadSize) {
      byte[] bytes = new byte[payloadSize];
      new Random().nextBytes(bytes);
      this.payload = bytes;
    }