### Question:
Author { public Author firstName(String firstName) { this.firstName = firstName; return this; }  Long getId(); void setId(Long id); String getFirstName(); void setFirstName(String firstName); Author firstName(String firstName); String getLastName(); void setLastName(String lastName); Author lastName(String lastName); String getBio(); void setBio(String bio); Author surnbioame(String bio); String getEmail(); void setEmail(String email); Author email(String email);  }### Answer:
@Test void shouldNotCreateAnAuthorWithNullFirstname() { Author author = new Author().firstName(null); tx.begin(); em.persist(author); assertThrows(RollbackException.class, () -> tx.commit()); }