### Question:
DataProviderConnection implements Serializable { @Override public boolean equals( Object obj ) { try { if ( !EqualsBuilder.reflectionEquals( this, obj ) ) { return false; } DataProviderConnection toCompare = (DataProviderConnection) obj; List<NameValueProperty> thisAttributeList = this.getAttributeList(); List<NameValueProperty> toCompareAttributeList = toCompare.getAttributeList(); if ( thisAttributeList != null && toCompareAttributeList != null ) { if ( thisAttributeList.size() != toCompareAttributeList.size() ) { return false; } for ( int i = 0; i < thisAttributeList.size(); i++ ) { if ( !thisAttributeList.get( i ).equals( toCompareAttributeList.get( i ) ) ) { return false; } } } return true; } catch ( Exception e ) { return false; } }  String getName(); void setName( String name ); String getDisplayName(); void setDisplayName( String displayName ); String getHostname(); void setHostname( String hostname ); String getDatabaseName(); void setDatabaseName( String databaseName ); String getUsername(); void setUsername( String username ); String getPassword(); void setPassword( String password ); boolean isChanged(); void setChanged( boolean changed ); @Deprecated Properties getAttributes(); @Deprecated void setAttributes( Properties attributes ); List<NameValueProperty> getAttributeList(); void setAttributeList( List<NameValueProperty> attributeList ); DatabaseMeta createDatabaseMeta(); void populateFrom( DatabaseMeta databaseMeta ); void persistDatabaseMeta( IMetaStore metaStore, DatabaseMeta databaseMeta ); DatabaseMeta load( final IMetaStore metaStore ); @Override boolean equals( Object obj );  }### Answer:
@Test public void testEquals() throws Exception { DataProviderConnection dpc1 = createDPC(); DataProviderConnection dpc2 = createDPC(); assertTrue( dpc1.equals( dpc2 ) ); List<NameValueProperty> aList = Collections.singletonList( new NameValueProperty( "name2", "value2" ) ); dpc1.setAttributeList( aList ); assertFalse( dpc1.equals( dpc2 ) ); dpc2.setAttributeList( aList ); assertTrue( dpc1.equals( dpc2 ) ); dpc2.setName( "other" ); assertFalse( dpc2.equals( dpc1 ) ); }