private void verifySubsetOfTablesBecameExternal(Set<String> expectedExternals) throws Throwable {
    Set<String> allTables = Sets.newHashSet("manwhnone", "manoutnone", "manwhwh", "manwhout", "manwhmixed",
        "manoutout", "custdb.custmanwhwh");

    for (String expectedExternalTableName : expectedExternals) {
      assertEquals(TableType.EXTERNAL_TABLE, Hive.get().getTable(expectedExternalTableName).getTableType());
    }

    for (String expectedLeftAsManagedTableName : Sets.difference(allTables, expectedExternals)) {
      assertEquals(TableType.MANAGED_TABLE, Hive.get().getTable(expectedLeftAsManagedTableName).getTableType());
    }

  }
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