### Question:
AuthorizationRequest { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; AuthorizationRequest that = (AuthorizationRequest) o; return Objects.equals(id, that.id) && Objects.equals(pushPackage, that.pushPackage) && Objects.equals(deviceIds, that.deviceIds); } AuthorizationRequest(String id, String pushPackage, List<String> deviceIds); String getId(); String getPushPackage(); List<String> getDeviceIds(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void equalsTrueWhenAllItemsEqual() { AuthorizationRequest left = new AuthorizationRequest("ID", "Push package", new ArrayList<String>(){{add("ID");}}); AuthorizationRequest right = new AuthorizationRequest("ID", "Push package", new ArrayList<String>(){{add("ID");}}); assertTrue(left.equals(right)); }
@Test public void equalsTrueWhenAllNull() { AuthorizationRequest left = new AuthorizationRequest(null, null, null); AuthorizationRequest right = new AuthorizationRequest(null, null, null); assertTrue(left.equals(right)); }
@Test public void equalsFalseWhenIdNotEqual() { AuthorizationRequest left = new AuthorizationRequest("Left ID", "Push package", null); AuthorizationRequest right = new AuthorizationRequest("Right ID", "Push package", null); assertFalse(left.equals(right)); }
@Test public void equalsFalseWhenPushPackageNotEqual() { AuthorizationRequest left = new AuthorizationRequest("ID", "Left Push package", null); AuthorizationRequest right = new AuthorizationRequest("ID", "Right Push package", null); assertFalse(left.equals(right)); }
@Test public void equalsFalseWhenDeviceIdsNotEqual() { AuthorizationRequest left = new AuthorizationRequest("ID", "Push package", new ArrayList<String>(){{add("Left");}}); AuthorizationRequest right = new AuthorizationRequest("ID", "Push package", new ArrayList<String>(){{add("Right");}}); assertFalse(left.equals(right)); }