Account implements Identifiable<String>, Serializable { @Override @Transient @XmlTransient public boolean isIdSet() { return id != null && !id.isEmpty(); }  @Transient @XmlTransient List<String> getRoleNames(); @Override @Column(name = "ID", length = 36) @GeneratedValue(generator = "strategy-uuid2") @GenericGenerator(name = "strategy-uuid2", strategy = "uuid2") @Id String getId(); @Override void setId(String id); Account id(String id); @Override @Transient @XmlTransient boolean isIdSet(); @NotEmpty @Size(min = 4, max = 100) @Column(name = "LOGIN", nullable = false, unique = true, length = 100) @Field(analyzer = @Analyzer(definition = "custom")) String getUsername(); void setUsername(String username); Account username(String username); @NotEmpty @Size(max = 100) @Column(name = "`PASSWORD`", nullable = false, length = 100) String getPassword(); void setPassword(String password); Account password(String password); @Email @NotEmpty @Size(max = 100) @Column(name = "EMAIL", nullable = false, unique = true, length = 100) @Field(analyzer = @Analyzer(definition = "custom")) String getEmail(); void setEmail(String email); Account email(String email); @NotNull @Column(name = "IS_ENABLED", nullable = false, length = 1) Boolean getIsEnabled(); void setIsEnabled(Boolean isEnabled); Account isEnabled(Boolean isEnabled); @Column(name = "CIVILITY", length = 2) @Enumerated(STRING) Civility getCivility(); void setCivility(Civility civility); Account civility(Civility civility); @Size(max = 100) @Column(name = "FIRST_NAME", length = 100) @Field(analyzer = @Analyzer(definition = "custom")) String getFirstName(); void setFirstName(String firstName); Account firstName(String firstName); @Size(max = 100) @Column(name = "LAST_NAME", length = 100) @Field(analyzer = @Analyzer(definition = "custom")) String getLastName(); void setLastName(String lastName); Account lastName(String lastName); @Column(name = "BIRTH_DATE", length = 23) @Temporal(TIMESTAMP) Date getBirthDate(); void setBirthDate(Date birthDate); Account birthDate(Date birthDate); @Size(max = 255) @Column(name = "DESCRIPTION") String getDescription(); void setDescription(String description); Account description(String description); @Column(name = "CREATION_DATE", length = 23) @Temporal(TIMESTAMP) Date getCreationDate(); void setCreationDate(Date creationDate); Account creationDate(Date creationDate); @Column(name = "CREATION_AUTHOR", length = 200) String getCreationAuthor(); void setCreationAuthor(String creationAuthor); Account creationAuthor(String creationAuthor); @Column(name = "LAST_MODIFICATION_DATE", length = 23) @Temporal(TIMESTAMP) Date getLastModificationDate(); void setLastModificationDate(Date lastModificationDate); Account lastModificationDate(Date lastModificationDate); @Column(name = "LAST_MODIFICATION_AUTHOR", length = 200) String getLastModificationAuthor(); void setLastModificationAuthor(String lastModificationAuthor); Account lastModificationAuthor(String lastModificationAuthor); @Column(name = "VERSION", precision = 10) @Version Integer getVersion(); void setVersion(Integer version); Account version(Integer version); @JoinColumn(name = "ADDRESS_ID") @ManyToOne(cascade = { PERSIST, MERGE }, fetch = LAZY) Address getHomeAddress(); void setHomeAddress(Address homeAddress); Account homeAddress(Address homeAddress); @OneToMany(mappedBy = "owner", orphanRemoval = true, cascade = ALL) List<Book> getCoolBooks(); void setCoolBooks(List<Book> coolBooks); boolean addBook(Book book); boolean removeBook(Book book); @OneToMany(mappedBy = "owner", orphanRemoval = true, cascade = ALL) List<Document> getEdocs(); void setEdocs(List<Document> edocs); boolean addEdoc(Document edoc); boolean removeEdoc(Document edoc); @JoinTable(name = "ACCOUNT_ROLE", joinColumns = @JoinColumn(name = "ACCOUNT_ID"), inverseJoinColumns = @JoinColumn(name = "ROLE_ID")) @ManyToMany(cascade = { PERSIST, MERGE }) List<Role> getSecurityRoles(); void setSecurityRoles(List<Role> securityRoles); boolean addSecurityRole(Role securityRole); boolean removeSecurityRole(Role securityRole); boolean containsSecurityRole(Role securityRole); Account withDefaults(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }
@Test public void newInstanceHasNoPrimaryKey() { Account model = new Account(); assertThat(model.isIdSet()).isFalse(); }