Source:
<code>public static List<RowMap>getRowsWithReplicator(final MysqlIsolatedServer mysql, MaxwellFilter filter, MaxwellTestSupportCallback callback) throws Exception { final ArrayList<RowMap> list = new ArrayList<>(); clearSchemaStore(mysql); MaxwellConfig config = new MaxwellConfig(); config.maxwellMysql.user = "maxwell"; config.maxwellMysql.password = "maxwell"; config.maxwellMysql.host = "localhost"; config.maxwellMysql.port = mysql.getPort(); config.replicationMysql = config.maxwellMysql; if ( filter != null ) { if ( filter.isDatabaseWhitelist() ) filter.includeDatabase("test"); if ( filter.isTableWhitelist() ) filter.includeTable("boundary"); } config.filter = filter; config.bootstrapperType = "sync"; callback.beforeReplicatorStart(mysql); config.initPosition = BinlogPosition.capture(mysql.getConnection()); BufferedMaxwell maxwell = new BufferedMaxwell(config); new Thread(maxwell).start(); mysql.execute("CREATE TABLE if not exists test.boundary ( i int )"); mysql.execute("insert into test.boundary set i = 1"); maxwell.getRow(5, TimeUnit.SECONDS); callback.afterReplicatorStart(mysql); <START> BinlogPosition finalPosition = BinlogPosition.capture(mysql.getConnection()); <END> mysql.execute("insert into test.boundary set i = 1"); for ( int nullChecksLeft = 100 ; nullChecksLeft > 0 ; nullChecksLeft-- ) { RowMap row = maxwell.getRow(10, TimeUnit.MILLISECONDS); if ( row == null ) continue; if ( row.getPosition().newerThan(finalPosition) ) nullChecksLeft = 2; if ( !row.getTable().equals("boundary")) list.add(row); } callback.beforeTerminate(mysql); maxwell.terminate(); return list; }</code><technical_language>TestMaxwellReplicator anymore</technical_language>

Target:
public static List<RowMap>getRowsWithReplicator(final MysqlIsolatedServer mysql, MaxwellFilter filter, MaxwellTestSupportCallback callback) throws Exception { final ArrayList<RowMap> list = new ArrayList<>(); clearSchemaStore(mysql); MaxwellConfig config = new MaxwellConfig(); config.maxwellMysql.user = "maxwell"; config.maxwellMysql.password = "maxwell"; config.maxwellMysql.host = "localhost"; config.maxwellMysql.port = mysql.getPort(); config.replicationMysql = config.maxwellMysql; if ( filter != null ) { if ( filter.isDatabaseWhitelist() ) filter.includeDatabase("test"); if ( filter.isTableWhitelist() ) filter.includeTable("boundary"); } config.filter = filter; config.bootstrapperType = "sync"; callback.beforeReplicatorStart(mysql); config.initPosition = BinlogPosition.capture(mysql.getConnection()); BufferedMaxwell maxwell = new BufferedMaxwell(config); new Thread(maxwell).start(); mysql.execute("CREATE TABLE if not exists test.boundary ( i int )"); mysql.execute("insert into test.boundary set i = 1"); maxwell.poll(5000); callback.afterReplicatorStart(mysql); BinlogPosition finalPosition = BinlogPosition.capture(mysql.getConnection()); mysql.execute("insert into test.boundary set i = 1"); for ( int nullChecksLeft = 100 ; nullChecksLeft > 0 ; nullChecksLeft-- ) { RowMap row = maxwell.poll(10); if ( row == null ) continue; if ( row.getPosition().newerThan(finalPosition) ) nullChecksLeft = 2; if ( !row.getTable().equals("boundary")) list.add(row); } callback.beforeTerminate(mysql); maxwell.terminate(); return list; }