### Question:
MetastoreClientUtils { public static void validateTableObject(Table table, Configuration conf) throws InvalidObjectException { checkNotNull(table, "table cannot be null"); checkNotNull(table.getSd(), "Table#StorageDescriptor cannot be null"); if (!hiveShims.validateTableName(table.getTableName(), conf)) { throw new InvalidObjectException(table.getTableName() + " is not a valid object name"); } String validate = MetaStoreUtils.validateTblColumns(table.getSd().getCols()); if (validate != null) { throw new InvalidObjectException("Invalid column " + validate); } if (table.getPartitionKeys() != null) { validate = MetaStoreUtils.validateTblColumns(table.getPartitionKeys()); if (validate != null) { throw new InvalidObjectException("Invalid partition column " + validate); } } } 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(expected = InvalidObjectException.class) public void testValidateTableObjectInvalidName() throws Exception { testTbl.setTableName("!"); MetastoreClientUtils.validateTableObject(testTbl, conf); }
@Test(expected = InvalidObjectException.class) public void testValidateTableObjectInvalidColumnName() throws Exception { testTbl.getSd().getCols().get(0).setType("invalidtype"); MetastoreClientUtils.validateTableObject(testTbl, conf); }
@Test(expected = InvalidObjectException.class) public void testValidateTableObjectInvalidPartitionKeys() throws Exception { testTbl.getPartitionKeys().get(0).setType("invalidtype"); MetastoreClientUtils.validateTableObject(testTbl, conf); }