@Test(expected = IllegalArgumentException.class)
  public void testExceptionForDbRegexPlusControlFile() throws Throwable {
    try {
      String[] args = {"-m", "automatic", "--dbRegex", "db0", "--controlFileUrl", "file:/tmp/file"};
      runMigrationTool(new HiveConf(hiveConf), args);
    } catch (Exception e) {
      // Exceptions are re-packaged by the migration tool...
      throw e.getCause();
    }
  }
Tests shouldMoveExternal option on all possible scenarios of the following dimensions:
- managed or external table type?
- location in (old) warehouse or truly external location?
- is partitioned?
- is partition location default (under table directory) or custom external path?
- default or custom database?
@throws Exception
ql/src/test/org/apache/hadoop/hive/ql/util/TestHiveStrictManagedMigration.java