@Test public void shoulCreateACustomer() throws Exception { Customer customer = new Customer("John", "Smith", "jsmith@gmail.com", "1234565", new Date(), new Date()); tx.begin(); em.persist(customer); tx.commit(); Assertions.assertNotNull(customer.getId(), "Id should not be null"); }
public Long getId() { return id; }
Customer { public Long getId() { return id; } }
Customer { public Long getId() { return id; } Customer();  Customer(String firstName, String lastName, String email, String phoneNumber, Date dateOfBirth, Date creationDate); }
Customer { public Long getId() { return id; } Customer();  Customer(String firstName, String lastName, String email, String phoneNumber, Date dateOfBirth, Date creationDate); Long getId(); String getFirstName(); void setFirstName(String firstName); String getLastName(); void setLastName(String lastName); String getEmail(); void setEmail(String email); String getPhoneNumber(); void setPhoneNumber(String phoneNumber); Date getDateOfBirth(); void setDateOfBirth(Date dateOfBirth); Date getCreationDate(); void setCreationDate(Date creationDate); }
Customer { public Long getId() { return id; } Customer();  Customer(String firstName, String lastName, String email, String phoneNumber, Date dateOfBirth, Date creationDate); Long getId(); String getFirstName(); void setFirstName(String firstName); String getLastName(); void setLastName(String lastName); String getEmail(); void setEmail(String email); String getPhoneNumber(); void setPhoneNumber(String phoneNumber); Date getDateOfBirth(); void setDateOfBirth(Date dateOfBirth); Date getCreationDate(); void setCreationDate(Date creationDate);  }