### Question:
TableProviderFactory { public Map<String, List<TableName>> getSchemas() { return schemas; } TableProviderFactory(); @VisibleForTesting protected  TableProviderFactory(AmazonEC2 ec2, AmazonElasticMapReduce emr, AmazonRDS rds, AmazonS3 amazonS3); Map<TableName, TableProvider> getTableProviders(); Map<String, List<TableName>> getSchemas();  }### Answer:
@Test public void getSchemas() { int schemas = 0; int tables = 0; for (Map.Entry<String, List<TableName>> next : factory.getSchemas().entrySet()) { for (TableName nextTableName : next.getValue()) { assertEquals(next.getKey(), nextTableName.getSchemaName()); tables++; } schemas++; } assertEquals(expectedSchemas, schemas); assertEquals(expectedTables, tables); }