@Test
public void testRenameTable() {

  String sql = "RENAME TABLE db2.table3 TO db2.table4";
  QueryEvent event = new QueryEvent(1L, TIMESTAMP, BINLOG_FILE_POS, "db2", sql);
  when(schemaDatabase.getColumnsForAllTables("db2"))
      .thenReturn(ImmutableMap.of("table4", TABLE3_COLUMNS));
  schemaManager.processDDL(event, GTID);
  verify(schemaDatabase).applyDDL(sql, "db2");
  verify(schemaStore)
      .put(
          new MysqlTableSchema(
              0,
              "db2",
              "table3",
              BINLOG_FILE_POS,
              GTID,
              sql,
              TIMESTAMP,
              Collections.emptyList(),
              Collections.emptyMap()));
  verify(schemaStore)
      .put(
          new MysqlTableSchema(
              0,
              "db2",
              "table4",
              BINLOG_FILE_POS,
              GTID,
              sql,
              TIMESTAMP,
              TABLE3_COLUMNS,
              Collections.emptyMap()));
}