protected boolean databaseForBothDbInterfacesIsTheSame( DatabaseInterface primary, DatabaseInterface secondary ) {
    if ( primary == null || secondary == null ) {
      throw new IllegalArgumentException( "DatabaseInterface shouldn't be null!" );
    }

    if ( primary.getPluginId() == null || secondary.getPluginId() == null ) {
      return false;
    }

    if ( primary.getPluginId().equals( secondary.getPluginId() ) ) {
      return true;
    }

    return primary.getClass().isAssignableFrom( secondary.getClass() );
  }
@Test
  public void databases_WithDifferentDbConnTypes_AreDifferent_IfNonOfThemIsSubsetOfAnother() {
    DatabaseInterface mssqlServerDatabaseMeta = new MSSQLServerDatabaseMeta();
    mssqlServerDatabaseMeta.setPluginId( "MSSQL" );
    DatabaseInterface oracleDatabaseMeta = new OracleDatabaseMeta();
    oracleDatabaseMeta.setPluginId( "ORACLE" );

    assertFalse( databaseMeta.databaseForBothDbInterfacesIsTheSame( mssqlServerDatabaseMeta, oracleDatabaseMeta ) );
  }