### Question:
AWSGlueMetastoreCacheDecorator extends AWSGlueMetastoreBaseDecorator { @Override public void deleteTable(String dbName, String tableName) { super.deleteTable(dbName, tableName); if(tableCacheEnabled) { purgeTableFromCache(dbName, tableName); } } AWSGlueMetastoreCacheDecorator(HiveConf conf, AWSGlueMetastore awsGlueMetastore); @Override Database getDatabase(String dbName); @Override void updateDatabase(String dbName, DatabaseInput databaseInput); @Override void deleteDatabase(String dbName); @Override Table getTable(String dbName, String tableName); @Override void updateTable(String dbName, TableInput tableInput); @Override void deleteTable(String dbName, String tableName);  }### Answer:
@Test public void testDeleteTableWhenCacheDisabled() { when(hiveConf.getBoolean(AWS_GLUE_TABLE_CACHE_ENABLE, false)).thenReturn(false); AWSGlueMetastoreCacheDecorator cacheDecorator = new AWSGlueMetastoreCacheDecorator(hiveConf, glueMetastore); doNothing().when(glueMetastore).deleteTable(DB_NAME, TABLE_NAME); cacheDecorator.deleteTable(DB_NAME, TABLE_NAME); assertNull(cacheDecorator.tableCache); verify(glueMetastore, times(1)).deleteTable(DB_NAME, TABLE_NAME); }