### Question:
TableUtil { @SuppressWarnings("rawtypes") public static Map<String, List> getTableSummaries() throws TException { CachingBlurClient client = Config.getCachingBlurClient(); List<Map<String, Object>> summaries = new ArrayList<Map<String, Object>>(); List<String> clusters = client.shardClusterList(); for (String cluster : clusters) { List<String> tables = client.tableListByCluster(cluster); for (String table : tables) { Map<String, Object> tableInfo = new HashMap<String, Object>(); tableInfo.put("cluster", cluster); tableInfo.put("name", table); try { TableDescriptor descriptor = client.describe(table); tableInfo.put("enabled", descriptor.isEnabled()); tableInfo.put("readonly", descriptor.isReadOnly()); if (descriptor.isEnabled()) { TableStats stats = client.tableStats(table); tableInfo.put("rows", stats.getRowCount()); tableInfo.put("records", stats.getRecordCount()); Schema schema = client.schema(table); tableInfo.put("families", new ArrayList<String>(schema.getFamilies().keySet())); } else { tableInfo.put("rows", "?"); tableInfo.put("records", "?"); tableInfo.put("families", new ArrayList<String>()); } } catch(Exception e) { tableInfo.put("error", e.getMessage()); } summaries.add(tableInfo); } } Map<String, List> data = new HashMap<String, List>(); data.put("tables", summaries); data.put("clusters", clusters); return data; }  @SuppressWarnings("rawtypes") static Map<String, List> getTableSummaries(); static Map<String, Map<String, Map<String, Object>>> getSchema(String table); static List<String> getTerms(String table, String family, String column, String startWith); static void disableTable(String table); static void enableTable(String table); static void deleteTable(String table, boolean includeFiles); static void copyTable(String srcTable, String destTable, String destLocation, String cluster);  }### Answer:
@SuppressWarnings("rawtypes") @Test public void testGetTableSummariesNoTables() throws Exception { Map<String, List> data = TableUtil.getTableSummaries(); assertEquals(0, data.get("tables").size()); }
@SuppressWarnings({"unchecked", "rawtypes"}) @Test public void testGetTableSummaries() throws Exception { Iface client = Config.getClient(); TableDescriptor td = new TableDescriptor(); td.setShardCount(11); td.setTableUri("file: td.setCluster("default"); td.setName("tableUnitTable"); td.setEnabled(true); client.createTable(td); Map<String, List> data = TableUtil.getTableSummaries(); assertEquals(1, data.get("tables").size()); assertEquals(0l, ((Map<String, Object>) data.get("tables").get(0)).get("rows")); assertEquals(0l, ((Map<String, Object>) data.get("tables").get(0)).get("records")); assertEquals("default", ((Map<String, Object>) data.get("tables").get(0)).get("cluster")); assertEquals("tableUnitTable", ((Map<String, Object>) data.get("tables").get(0)).get("name")); assertEquals(0, ((List<String>) ((Map<String, Object>) data.get("tables").get(0)).get("families")).size()); }