### Question:
CloudwatchMetadataHandler extends MetadataHandler { @Override public GetTableResponse doGetTable(BlockAllocator blockAllocator, GetTableRequest getTableRequest) { TableName tableName = getTableRequest.getTableName(); tableResolver.validateTable(tableName); return new GetTableResponse(getTableRequest.getCatalogName(), getTableRequest.getTableName(), CLOUDWATCH_SCHEMA, Collections.singleton(LOG_STREAM_FIELD)); } CloudwatchMetadataHandler(); @VisibleForTesting protected  CloudwatchMetadataHandler(AWSLogs awsLogs,
            EncryptionKeyFactory keyFactory,
            AWSSecretsManager secretsManager,
            AmazonAthena athena,
            String spillBucket,
            String spillPrefix); @Override ListSchemasResponse doListSchemaNames(BlockAllocator blockAllocator, ListSchemasRequest listSchemasRequest); @Override ListTablesResponse doListTables(BlockAllocator blockAllocator, ListTablesRequest listTablesRequest); @Override GetTableResponse doGetTable(BlockAllocator blockAllocator, GetTableRequest getTableRequest); @Override void enhancePartitionSchema(SchemaBuilder partitionSchemaBuilder, GetTableLayoutRequest request); @Override void getPartitions(BlockWriter blockWriter, GetTableLayoutRequest request, QueryStatusChecker queryStatusChecker); @Override GetSplitsResponse doGetSplits(BlockAllocator allocator, GetSplitsRequest request);  }### Answer:
@Test public void doGetTable() { logger.info("doGetTable - enter"); String expectedSchema = "schema-20"; when(mockAwsLogs.describeLogStreams(any(DescribeLogStreamsRequest.class))).thenAnswer((InvocationOnMock invocationOnMock) -> { DescribeLogStreamsRequest request = (DescribeLogStreamsRequest) invocationOnMock.getArguments()[0]; assertTrue(request.getLogGroupName().equals(expectedSchema)); DescribeLogStreamsResult result = new DescribeLogStreamsResult(); Integer nextToken; if (request.getNextToken() == null) { nextToken = 1; } else if (Integer.valueOf(request.getNextToken()) < 3) { nextToken = Integer.valueOf(request.getNextToken()) + 1; } else { nextToken = null; } List<LogStream> logStreams = new ArrayList<>(); if (request.getNextToken() == null || Integer.valueOf(request.getNextToken()) < 3) { for (int i = 0; i < 10; i++) { LogStream nextLogStream = new LogStream(); nextLogStream.setLogStreamName("table-" + String.valueOf(i)); logStreams.add(nextLogStream); } } result.withLogStreams(logStreams); if (nextToken != null) { result.setNextToken(String.valueOf(nextToken)); } return result; }); GetTableRequest req = new GetTableRequest(identity, "queryId", "default", new TableName(expectedSchema, "table-9")); GetTableResponse res = handler.doGetTable(allocator, req); logger.info("doGetTable - {} {}", res.getTableName(), res.getSchema()); assertEquals(new TableName(expectedSchema, "table-9"), res.getTableName()); assertTrue(res.getSchema() != null); verify(mockAwsLogs, times(1)).describeLogStreams(any(DescribeLogStreamsRequest.class)); logger.info("doGetTable - exit"); }