### Question:
AWSInstance { @Override public int hashCode(){ return Objects.hash(id, application, name, instanceId, ip, status,platform); } AWSInstance();  AWSInstance(String name, String application, String instanceId, String ip, String status, String platform); @Id @GeneratedValue Long getId(); String getName(); AWSInstance setName(String name); String getApplication(); AWSInstance setApplication(String application); String getInstanceId(); AWSInstance setInstanceId(String instanceId); String getIp(); AWSInstance setIp(String ip); String getStatus(); AWSInstance setStatus(String status); String getPlatform(); AWSInstance setPlatform(String platform); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testHashCode(){ String name = "The Dude"; String application = "TST"; String instanceId = "i-tst"; String ip = "127.0.0.1"; String platform ="Linux"; AWSInstance awsInstance = new AWSInstance() .setId(1L) .setName(name) .setApplication(application) .setInstanceId(instanceId) .setIp(ip) .setPlatform(platform); AWSInstance awsInstance2 = new AWSInstance() .setId(2L) .setName(name) .setApplication(application) .setInstanceId(instanceId) .setIp(ip) .setPlatform(platform); Assert.assertNotEquals(awsInstance.hashCode(), awsInstance2.hashCode()); }