### Question:
HbaseMetadataHandler extends GlueMetadataHandler { @Override public GetSplitsResponse doGetSplits(BlockAllocator blockAllocator, GetSplitsRequest request) throws IOException { Set<Split> splits = new HashSet<>(); for (HRegionInfo info : getOrCreateConn(request).getTableRegions(HbaseSchemaUtils.getQualifiedTable(request.getTableName()))) { Split.Builder splitBuilder = Split.newBuilder(makeSpillLocation(request), makeEncryptionKey()) .add(HBASE_CONN_STR, getConnStr(request)) .add(START_KEY_FIELD, new String(info.getStartKey())) .add(END_KEY_FIELD, new String(info.getEndKey())) .add(REGION_ID_FIELD, String.valueOf(info.getRegionId())) .add(REGION_NAME_FIELD, info.getRegionNameAsString()); splits.add(splitBuilder.build()); } return new GetSplitsResponse(request.getCatalogName(), splits, null); } HbaseMetadataHandler(); @VisibleForTesting protected  HbaseMetadataHandler(AWSGlue awsGlue,
            EncryptionKeyFactory keyFactory,
            AWSSecretsManager secretsManager,
            AmazonAthena athena,
            HbaseConnectionFactory connectionFactory,
            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 doGetSplits() throws IOException { List<HRegionInfo> regionServers = new ArrayList<>(); regionServers.add(TestUtils.makeRegion(1, "schema1", "table1")); regionServers.add(TestUtils.makeRegion(2, "schema1", "table1")); regionServers.add(TestUtils.makeRegion(3, "schema1", "table1")); regionServers.add(TestUtils.makeRegion(4, "schema1", "table1")); when(mockClient.getTableRegions(any())).thenReturn(regionServers); List<String> partitionCols = new ArrayList<>(); Block partitions = BlockUtils.newBlock(allocator, "partitionId", Types.MinorType.INT.getType(), 0); String continuationToken = null; GetSplitsRequest originalReq = new GetSplitsRequest(IDENTITY, QUERY_ID, DEFAULT_CATALOG, TABLE_NAME, partitions, partitionCols, new Constraints(new HashMap<>()), null); GetSplitsRequest req = new GetSplitsRequest(originalReq, continuationToken); logger.info("doGetSplits: req[{}]", req); MetadataResponse rawResponse = handler.doGetSplits(allocator, req); assertEquals(MetadataRequestType.GET_SPLITS, rawResponse.getRequestType()); GetSplitsResponse response = (GetSplitsResponse) rawResponse; continuationToken = response.getContinuationToken(); logger.info("doGetSplits: continuationToken[{}] - numSplits[{}]", new Object[] {continuationToken, response.getSplits().size()}); assertTrue("Continuation criteria violated", response.getSplits().size() == 4); assertTrue("Continuation criteria violated", response.getContinuationToken() == null); }