use of com.amazonaws.athena.connector.lambda.metadata.ListSchemasRequest in project aws-athena-query-federation by awslabs.
the class DocDBMetadataHandlerTest method doListSchemaNames.
@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()));
}
Aggregations