### Question:
DirectoryV3DevicesListPostResponseDevice { @Override public int hashCode() { int result = getId() != null ? getId().hashCode() : 0; result = 31 * result + (getName() != null ? getName().hashCode() : 0); result = 31 * result + (getType() != null ? getType().hashCode() : 0); result = 31 * result + getStatus(); result = 31 * result + (getCreated() != null ? getCreated().hashCode() : 0); result = 31 * result + (getUpdated() != null ? getUpdated().hashCode() : 0); return result; } DirectoryV3DevicesListPostResponseDevice(
            @JsonProperty(value = "id") UUID id,
            @JsonProperty(value = "name") String name,
            @JsonProperty(value = "type") String type,
            @JsonProperty(value = "status") int status,
            @JsonProperty(value = "created") Date created,
            @JsonProperty(value = "updated") Date updated
    ); UUID getId(); String getName(); String getType(); int getStatus(); Date getCreated(); Date getUpdated(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void hashCodeForEqualObjectsIsEqual() throws Exception { UUID id = UUID.randomUUID(); DirectoryV3DevicesListPostResponseDevice device = new DirectoryV3DevicesListPostResponseDevice(id, "name", "type", 1, null, null); DirectoryV3DevicesListPostResponseDevice other = new DirectoryV3DevicesListPostResponseDevice(id, "name", "type", 1, null, null); assertEquals(device.hashCode(), other.hashCode()); }
@Test public void hashCodeForUnequalObjectsIsNotEqual() throws Exception { DirectoryV3DevicesListPostResponseDevice device = new DirectoryV3DevicesListPostResponseDevice(UUID.randomUUID(), "name", "type", 1, null, null); DirectoryV3DevicesListPostResponseDevice other = new DirectoryV3DevicesListPostResponseDevice(UUID.randomUUID(), "name", "type", 1, null, null); assertNotEquals(device.hashCode(), other.hashCode()); }