### Question:
MetastoreClientUtils { public static boolean isExternalTable(org.apache.hadoop.hive.metastore.api.Table table) { if (table == null) { return false; } Map<String, String> params = table.getParameters(); String paramsExternalStr = params == null ? null : params.get("EXTERNAL"); if (paramsExternalStr != null) { return "TRUE".equalsIgnoreCase(paramsExternalStr); } return table.getTableType() != null && EXTERNAL_TABLE.name().equalsIgnoreCase(table.getTableType()); } private  MetastoreClientUtils(); static boolean makeDirs(Warehouse wh, Path path); static void validateTableObject(Table table, Configuration conf); static void validateGlueTable(com.amazonaws.services.glue.model.Table table); static Map<K, V> deepCopyMap(Map<K, V> originalMap); static boolean isExternalTable(org.apache.hadoop.hive.metastore.api.Table table); static String getCatalogId(Configuration conf);  }### Answer:
@Test public void testIsExternalTableFalse() { assertFalse(MetastoreClientUtils.isExternalTable(testTbl)); }
@Test public void testIsExternalTableParamTrue() { testTbl.getParameters().put("EXTERNAL", "true"); assertTrue(MetastoreClientUtils.isExternalTable(testTbl)); }
@Test public void testIsExternalTableTableTypeTrue() { testTbl.setTableType(EXTERNAL_TABLE.name()); testTbl.setParameters(null); assertTrue(MetastoreClientUtils.isExternalTable(testTbl)); }
@Test public void testIsExternalTableParamPriority() { testTbl.getParameters().put("EXTERNAL", "false"); testTbl.setTableType(EXTERNAL_TABLE.name()); assertFalse(MetastoreClientUtils.isExternalTable(testTbl)); }
@Test public void testIsExternalTableNull() { assertFalse(MetastoreClientUtils.isExternalTable(null)); }