@@ -0,0 +1,2295 @@
+package org.realityforge.dbdiff;%0A%0Aimport java.sql.Connection;%0Aimport java.sql.SQLException;%0Aimport java.util.Properties;%0Aimport java.util.logging.ConsoleHandler;%0Aimport java.util.logging.Logger;%0Aimport org.postgresql.Driver;%0Aimport static org.testng.Assert.*;%0A%0Apublic abstract class AbstractDatabaseDiffTest%0A%7B%0A  protected abstract Dialect getDialect();%0A%0A  protected abstract Driver getDriver();%0A%0A  protected abstract String getDatabase1();%0A%0A  protected abstract String getDatabase2();%0A%0A  protected final void assertMatch( final String schema,%0A                                    final String ddl1,%0A                                    final String ddl2 )%0A    throws Exception%0A  %7B%0A    diff( schema, ddl1, ddl2, true );%0A  %7D%0A%0A  protected final void assertNotMatch( final String schema,%0A                                       final String ddl1,%0A                                       final String ddl2 )%0A    throws Exception%0A  %7B%0A    diff( schema, ddl1, ddl2, false );%0A  %7D%0A%0A  protected final void diff( final String schema,%0A                             final String ddl1,%0A                             final String ddl2,%0A                             final boolean shouldMatch )%0A    throws Exception%0A  %7B%0A    final DatabaseDiff dd = newDatabaseDiff();%0A    dd.setLogger( newLogger() );%0A    dd.getSchemas().add( schema );%0A%0A    executeSQL( ddl1, getDatabase1() );%0A    executeSQL( ddl2, getDatabase2() );%0A%0A    assertEquals( dd.diff(), !shouldMatch, %22Does diff match expected%22 );%0A  %7D%0A%0A  private DatabaseDiff newDatabaseDiff()%0A  %7B%0A    final DatabaseDiff dd = new DatabaseDiff();%0A    dd.setDialect( getDialect() );%0A    dd.setDriver( getDriver() );%0A    dd.setDatabase1( getDatabase1() );%0A    dd.setDatabase2( getDatabase2() );%0A    return dd;%0A  %7D%0A%0A  private Logger newLogger()%0A  %7B%0A    final Logger logger = Logger.getAnonymousLogger();%0A    logger.setUseParentHandlers( false );%0A    final ConsoleHandler handler = new ConsoleHandler();%0A    handler.setFormatter( new RawFormatter() );%0A    logger.addHandler( handler );%0A    return logger;%0A  %7D%0A%0A  protected final void executeSQL( final String sql, final String database )%0A    throws SQLException%0A  %7B%0A    final Connection connection1 = getDriver().connect( database, new Properties() );%0A    connection1.createStatement().execute( sql );%0A    connection1.close();%0A  %7D%0A%7D%0A

Add base class for tests