@Test public void shoulCreateACustomer() throws Exception { Customer customer = new Customer("John", "Smith", "jsmith@gmail.com", "1234565", LocalDate.now(), LocalDateTime.now()); 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, LocalDate dateOfBirth, LocalDateTime creationDate); }
Customer { public Long getId() { return id; } Customer();  Customer(String firstName, String lastName, String email, String phoneNumber, LocalDate dateOfBirth, LocalDateTime 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); LocalDate getDateOfBirth(); void setDateOfBirth(LocalDate dateOfBirth); Integer getAge(); void setAge(Integer age); LocalDateTime getCreationDate(); void setCreationDate(LocalDateTime creationDate); }
Customer { public Long getId() { return id; } Customer();  Customer(String firstName, String lastName, String email, String phoneNumber, LocalDate dateOfBirth, LocalDateTime 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); LocalDate getDateOfBirth(); void setDateOfBirth(LocalDate dateOfBirth); Integer getAge(); void setAge(Integer age); LocalDateTime getCreationDate(); void setCreationDate(LocalDateTime creationDate);  }