UserMgmtServer { @Override public int hashCode() { HashCodeBuilder hashCodeBuilder = new HashCodeBuilder(); hashCodeBuilder.append(name) .append(type) .append(baseGroupDn) .append(baseUserDn) .append(primaryUrl) .append(secondaryUrl) .append(userName) .append(password) .append(mgmtVMUserGroupDn); return hashCodeBuilder.hashCode(); } UserMgmtServer();  UserMgmtServer(String name, Type type, String baseGroupDn, String baseUserDn, String primaryUrl, String secondaryUrl, String userName, String password, String mgmtVMUserGroupDn); String getName(); void setName(String name); Type getType(); void setType(Type type); String getBaseGroupDn(); void setBaseGroupDn(String baseGroupDn); String getBaseUserDn(); void setBaseUserDn(String baseUserDn); String getPrimaryUrl(); void setPrimaryUrl(String primaryUrl); String getSecondaryUrl(); void setSecondaryUrl(String secondaryUrl); String getUserName(); void setUserName(String userName); String getPassword(); void setPassword(String password); String getMgmtVMUserGroupDn(); void setMgmtVMUserGroupDn(String mgmtVMUserGroupDn); @Override int hashCode(); @Override boolean equals(Object obj); String findAdminGroupName();  }
@Test public void test() throws IOException { ObjectMapper objectMapper = new ObjectMapper(); UserMgmtServer userMgmtServer = objectMapper.readValue( TestUserMgmtServer.class.getResourceAsStream("/com/vmware/bdd/apitypes/ldap-server.json"), UserMgmtServer.class); UserMgmtServer userMgmtServer1 = objectMapper.readValue( TestUserMgmtServer.class.getResourceAsStream("/com/vmware/bdd/apitypes/ldap-server.json"), UserMgmtServer.class); Assert.assertEquals(userMgmtServer, userMgmtServer1); Assert.assertEquals(userMgmtServer.hashCode(), userMgmtServer1.hashCode()); }
@Test public void test1() throws IOException { ObjectMapper objectMapper = new ObjectMapper(); UserMgmtServer userMgmtServer = objectMapper.readValue( TestUserMgmtServer.class.getResourceAsStream("/com/vmware/bdd/apitypes/ldap-server.json"), UserMgmtServer.class); UserMgmtServer userMgmtServer1 = objectMapper.readValue( TestUserMgmtServer.class.getResourceAsStream("/com/vmware/bdd/apitypes/ldaps-server.json"), UserMgmtServer.class); Assert.assertNotEquals(userMgmtServer, userMgmtServer1); Assert.assertNotEquals(userMgmtServer.hashCode(), userMgmtServer1.hashCode()); }