@Test
public void reader() throws Exception {

    SchemaFactory schemaFactory = new SchemaFactory("test");
    AkibanInformationSchema ais = schemaFactory.aisWithRowDefs(DDL);
    Table t1 = ais.getTable("test", "t1");
    InputStream istr = new FileInputStream(DUMP_FILE);
    MysqlDumpRowReader reader = new MysqlDumpRowReader(t1, t1.getColumns(), 
                                                       istr, "UTF-8",
                                                       null, MTypesTranslator.INSTANCE);
    List<Row> rows = new ArrayList<>();
    Row row;
    while ((row = reader.nextRow()) != null)
        rows.add(row);
    istr.close();
    assertEquals("number of rows", ROWS.length, rows.size());
    for (int i = 0; i < ROWS.length; i++) {
        Object[] orow = ROWS[i];
        row = rows.get(i);
        assertEquals("row " + i + " size", orow.length, row.rowType().nFields());
        for (int j = 0; j < orow.length; j++) {
            assertEquals("row " + i + " col " + j, orow[j], ValueSources.toObject(row.value(j)));
        }
    }
}