Document implements Identifiable<String>, Serializable { @Override @Transient @XmlTransient public boolean isIdSet() { return id != null && !id.isEmpty(); }  @Override @Column(name = "ID", length = 36) @GeneratedValue(generator = "strategy-uuid2") @GenericGenerator(name = "strategy-uuid2", strategy = "uuid2") @Id String getId(); @Override void setId(String id); Document id(String id); @Override @Transient @XmlTransient boolean isIdSet(); @Basic(fetch = LAZY) @Column(name = "DOCUMENT_BINARY") @Lob @Field(store = Store.YES, analyzer = @Analyzer(definition = "custom")) @TikaBridge byte[] getDocumentBinary(); void setDocumentBinary(byte[] documentBinary); Document documentBinary(byte[] documentBinary); @NotEmpty @Size(max = 100) @Column(name = "DOCUMENT_FILE_NAME", nullable = false, length = 100) @Field(analyzer = @Analyzer(definition = "custom")) String getDocumentFileName(); void setDocumentFileName(String documentFileName); Document documentFileName(String documentFileName); @NotEmpty @Size(max = 100) @Column(name = "DOCUMENT_CONTENT_TYPE", nullable = false, length = 100) String getDocumentContentType(); void setDocumentContentType(String documentContentType); Document documentContentType(String documentContentType); @Digits(integer = 10, fraction = 0) @NotNull @Column(name = "DOCUMENT_SIZE", nullable = false, precision = 10) Integer getDocumentSize(); void setDocumentSize(Integer documentSize); Document documentSize(Integer documentSize); @Column(name = "VERSION", precision = 10) @Version Integer getVersion(); void setVersion(Integer version); Document version(Integer version); @JoinColumn(name = "ACCOUNT_ID", nullable = false) @ManyToOne(cascade = { PERSIST, MERGE }, fetch = LAZY) Account getOwner(); void setOwner(Account owner); Document owner(Account owner); Document withDefaults(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }
@Test public void newInstanceHasNoPrimaryKey() { Document model = new Document(); assertThat(model.isIdSet()).isFalse(); }