@Test
public void testDropDatabase() {

  String sql = "DROP DATABASE db1";
  QueryEvent event = new QueryEvent(1, TIMESTAMP, BINLOG_FILE_POS, null, sql);
  when(schemaDatabase.listDatabases()).thenReturn(ImmutableList.of("db2"));
  when(schemaDatabase.getColumnsForAllTables("db1")).thenReturn(Collections.emptyMap());
  schemaManager.processDDL(event, GTID);
  verify(schemaDatabase).applyDDL(sql, null);
  verify(schemaStore)
      .put(
          new MysqlTableSchema(
              0,
              "db1",
              "table1",
              BINLOG_FILE_POS,
              GTID,
              sql,
              TIMESTAMP,
              Collections.emptyList(),
              Collections.emptyMap()));
  verify(schemaStore)
      .put(
          new MysqlTableSchema(
              0,
              "db1",
              "table2",
              BINLOG_FILE_POS,
              GTID,
              sql,
              TIMESTAMP,
              Collections.emptyList(),
              Collections.emptyMap()));
}