### Question:
Customer { @Override public int hashCode() { return getId(); } Customer(int id, String firstName, String lastName); int getId(); void setId(final int id); String getFirstName(); void setFirstName(final String firstName); String getLastName(); void setLastName(final String lastName); @Override String toString(); @Override boolean equals(final Object that); @Override int hashCode();  }### Answer:
@Test public void notEqualWithDifferentId() { final var newId = 2; final var otherCustomer = new Customer(newId, FIRSTNAME, LASTNAME); assertNotEquals(customer, otherCustomer); assertNotEquals(customer.hashCode(), otherCustomer.hashCode()); }
@Test public void equalsWithSameObjectValues() { final var otherCustomer = new Customer(ID, FIRSTNAME, LASTNAME); assertEquals(customer, otherCustomer); assertEquals(customer.hashCode(), otherCustomer.hashCode()); }
@Test public void equalsWithSameObjects() { assertEquals(customer, customer); assertEquals(customer.hashCode(), customer.hashCode()); }