### Question:
DatabaseConnection extends Input implements Serializable { @Override public DatabaseConnection setId(long id) { super.setId(id); return this; } DatabaseConnection();  DatabaseConnection(String name);  DatabaseConnection(String url, String username, String password, DbSystem system); @Override DatabaseConnection setId(long id); String getUrl(); DatabaseConnection setUrl(String url); String getUsername(); DatabaseConnection setUsername(String username); String getPassword(); DatabaseConnection setPassword(String password); DbSystem getSystem(); DatabaseConnection setSystem(DbSystem system); String getComment(); DatabaseConnection setComment(String comment); @Override boolean equals(Object o); @Override int hashCode(); @Override @Transient @JsonIgnore String getIdentifier();  }### Answer:
@Test public void testEqualsAndHashCode() { long id = 42; DatabaseConnection databaseConnection = new DatabaseConnection("db") .setId(id); DatabaseConnection equalDatabaseConnection = new DatabaseConnection("db") .setId(id); DatabaseConnection notEqualDatabaseConnection = new DatabaseConnection("db") .setId(23); new EqualsAndHashCodeTester<DatabaseConnection>() .performBasicEqualsAndHashCodeChecks(databaseConnection, equalDatabaseConnection, notEqualDatabaseConnection); }