### Question:
Room { @Override public int hashCode() { int result = id; result = 31 * result + roomType.hashCode(); result = 31 * result + price; result = 31 * result + (booked ? 1 : 0); return result; } Room(int id, String roomType, int price, boolean booked); int getId(); void setId(int id); String getRoomType(); void setRoomType(String roomType); int getPrice(); void setPrice(int price); boolean isBooked(); void setBooked(boolean booked); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void notEqualWithDifferentId() { final var newId = 2; final var otherRoom = new Room(newId, ROOMTYPE, PRICE, BOOKED); assertNotEquals(room, otherRoom); assertNotEquals(room.hashCode(), otherRoom.hashCode()); }
@Test public void equalsWithSameObjectValues() { final var otherRoom = new Room(ID, ROOMTYPE, PRICE, BOOKED); assertEquals(room, otherRoom); assertEquals(room.hashCode(), otherRoom.hashCode()); }
@Test public void equalsWithSameObjects() { assertEquals(room, room); assertEquals(room.hashCode(), room.hashCode()); }