Book implements Identifiable<Integer>, Serializable { @Override @Transient @XmlTransient public boolean isIdSet() { return id != null; }  @Override @Column(name = "ID", precision = 10) @GeneratedValue @Id Integer getId(); @Override void setId(Integer id); Book id(Integer id); @Override @Transient @XmlTransient boolean isIdSet(); @NotEmpty @Size(max = 100) @Column(name = "TITLE", nullable = false, length = 100) @Field(analyzer = @Analyzer(definition = "custom")) String getBookTitle(); void setBookTitle(String bookTitle); Book bookTitle(String bookTitle); @Digits(integer = 10, fraction = 0) @NotNull @Column(name = "NUMBER_OF_PAGES", nullable = false, precision = 10) @Field(analyzer = @Analyzer(definition = "custom")) Integer getNumberOfPages(); void setNumberOfPages(Integer numberOfPages); Book numberOfPages(Integer numberOfPages); @Column(name = "VERSION", precision = 10) @Version Integer getVersion(); void setVersion(Integer version); Book version(Integer version); @JoinColumn(name = "ACCOUNT_ID") @ManyToOne(cascade = { PERSIST, MERGE }, fetch = LAZY) Account getOwner(); void setOwner(Account owner); Book owner(Account owner); Book withDefaults(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }
@Test public void newInstanceHasNoPrimaryKey() { Book model = new Book(); assertThat(model.isIdSet()).isFalse(); }