### Question:
Pet { @Override public int hashCode() { return Objects.hash(id, name); } Pet(@JsonProperty("id") Long id,
               @JsonProperty("name") String name); Long getId(); String getName(); void setId(Long id); void setName(String name); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testHashCode() { Pet firstPet = new Pet(1L, "Falco"); Pet secondPet = new Pet(2L, "Molly"); assertThat(firstPet.hashCode(), is(not(secondPet.hashCode()))); }