@Test
public void testReadRowSet() {

    Backup expected = new Backup();
    expected.setDatabase(new Database());
    expected.setFormat("csv");
    TableRowSet rowSet = new TableRowSet();
    rowSet.setType("table");
    rowSet.setName("test.t1");
    rowSet.setRowCount(1L);
    rowSet.setCatalog("test");
    rowSet.setTable("t1");
    rowSet.addColumn("f1", STRING);
    Chunk chunk = new Chunk();
    chunk.setName("test.t1.csv");
    chunk.setRowCount(1L);
    rowSet.addChunk(chunk);
    expected.addRowSet(rowSet);
    String input = "<?xml version=\"1.0\"?>\n" + "<backup version=\"" + Migrator.getVersion()
            + "\" format=\"csv\">\n" + "  <database/>\n"
            + "  <row-set type=\"table\" name=\"test.t1\" row-count=\"1\" catalog=\"test\" table=\"t1\">\n"
            + "    <column name=\"f1\" value-type=\"string\"/>\n"
            + "    <chunk name=\"test.t1.csv\" row-count=\"1\"/>\n" + "  </row-set>\n" + "</backup>";
    Backup actual = xmlBackupOps.read(toInputStream(input));
    assertEquals(actual, expected);
}