### Question:
DirectoryUserDeviceLinkData { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof DirectoryUserDeviceLinkData)) return false; DirectoryUserDeviceLinkData that = (DirectoryUserDeviceLinkData) o; return Objects.equals(getCode(), that.getCode()) && Objects.equals(getQrCodeUrl(), that.getQrCodeUrl()) && Objects.equals(getDeviceId(), that.getDeviceId()); } @Deprecated  DirectoryUserDeviceLinkData(String code, String qrCodeUrl); @JsonCreator  DirectoryUserDeviceLinkData(@JsonProperty(value = "code", required = true) String code,
                                       @JsonProperty(value = "qrcode", required = true) String qrCodeUrl,
                                       @JsonProperty(value = "device_id", required = true) UUID deviceId); String getCode(); String getQrCodeUrl(); UUID getDeviceId(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void equalsIsTrueForSameObject() throws Exception { assertTrue(deviceAddResponse.equals(deviceAddResponse)); }
@Test public void equalsIsTrueForEquivalentObject() throws Exception { assertTrue(deviceAddResponse.equals(new DirectoryUserDeviceLinkData(CODE, URL, DEVICE_ID))); }
@Test public void equalsIsFalseForDifferentCode() throws Exception { assertFalse(deviceAddResponse.equals(new DirectoryUserDeviceLinkData(null, URL, DEVICE_ID))); }
@Test public void equalsIsFalseForDifferentUrl() throws Exception { assertFalse(deviceAddResponse.equals(new DirectoryUserDeviceLinkData(CODE, null, DEVICE_ID))); }
@Test public void equalsIsFalseForDifferentDeviceId() throws Exception { assertFalse(deviceAddResponse.equals(new DirectoryUserDeviceLinkData(CODE, URL, null))); }