@Test public void shouldPersistACustomer() throws Exception { Customer customer = new Customer("Anthony", "Balla", "aballa@mail.com"); tx.begin(); em.persist(customer); tx.commit(); assertNotNull(customer.getId()); }
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); }
Customer { public Long getId() { return id; } Customer();  Customer(String firstName, String lastName, String email); Long getId(); String getFirstName(); void setFirstName(String firstName); String getLastName(); void setLastName(String lastName); String getEmail(); void setEmail(String email); Address getAddress(); void setAddress(Address address); }
Customer { public Long getId() { return id; } Customer();  Customer(String firstName, String lastName, String email); Long getId(); String getFirstName(); void setFirstName(String firstName); String getLastName(); void setLastName(String lastName); String getEmail(); void setEmail(String email); Address getAddress(); void setAddress(Address address);  }