### Question:
DocDBMetadataHandler extends GlueMetadataHandler { @Override public ListSchemasResponse doListSchemaNames(BlockAllocator blockAllocator, ListSchemasRequest request) { List<String> schemas = new ArrayList<>(); MongoClient client = getOrCreateConn(request); try (MongoCursor<String> itr = client.listDatabaseNames().iterator()) { while (itr.hasNext()) { schemas.add(itr.next()); } return new ListSchemasResponse(request.getCatalogName(), schemas); } } DocDBMetadataHandler(); @VisibleForTesting protected  DocDBMetadataHandler(AWSGlue glue,
            DocDBConnectionFactory connectionFactory,
            EncryptionKeyFactory keyFactory,
            AWSSecretsManager secretsManager,
            AmazonAthena athena,
            String spillBucket,
            String spillPrefix); @Override ListSchemasResponse doListSchemaNames(BlockAllocator blockAllocator, ListSchemasRequest request); @Override ListTablesResponse doListTables(BlockAllocator blockAllocator, ListTablesRequest request); @Override GetTableResponse doGetTable(BlockAllocator blockAllocator, GetTableRequest request); @Override void getPartitions(BlockWriter blockWriter, GetTableLayoutRequest request, QueryStatusChecker queryStatusChecker); @Override GetSplitsResponse doGetSplits(BlockAllocator blockAllocator, GetSplitsRequest request);  }### Answer:
@Test public void doListSchemaNames() { List<String> schemaNames = new ArrayList<>(); schemaNames.add("schema1"); schemaNames.add("schema2"); schemaNames.add("schema3"); when(mockClient.listDatabaseNames()).thenReturn(StubbingCursor.iterate(schemaNames)); ListSchemasRequest req = new ListSchemasRequest(IDENTITY, QUERY_ID, DEFAULT_CATALOG); ListSchemasResponse res = handler.doListSchemaNames(allocator, req); logger.info("doListSchemas - {}", res.getSchemas()); assertEquals(schemaNames, new ArrayList<>(res.getSchemas())); }