### Question:
ExampleMetadataHandler extends MetadataHandler { @Override public GetSplitsResponse doGetSplits(BlockAllocator allocator, GetSplitsRequest request) { logger.info("doGetSplits: enter - " + request); String catalogName = request.getCatalogName(); Set<Split> splits = new HashSet<>(); Block partitions = request.getPartitions(); FieldReader day = partitions.getFieldReader("day"); FieldReader month = partitions.getFieldReader("month"); FieldReader year = partitions.getFieldReader("year"); for (int i = 0; i < partitions.getRowCount(); i++) { year.setPosition(i); month.setPosition(i); day.setPosition(i); } logger.info("doGetSplits: exit - " + splits.size()); return new GetSplitsResponse(catalogName, splits); } ExampleMetadataHandler(); @VisibleForTesting protected  ExampleMetadataHandler(EncryptionKeyFactory keyFactory,
            AWSSecretsManager awsSecretsManager,
            AmazonAthena athena,
            String spillBucket,
            String spillPrefix); @Override ListSchemasResponse doListSchemaNames(BlockAllocator allocator, ListSchemasRequest request); @Override ListTablesResponse doListTables(BlockAllocator allocator, ListTablesRequest request); @Override GetTableResponse doGetTable(BlockAllocator allocator, GetTableRequest request); @Override void getPartitions(BlockWriter blockWriter, GetTableLayoutRequest request, QueryStatusChecker queryStatusChecker); @Override GetSplitsResponse doGetSplits(BlockAllocator allocator, GetSplitsRequest request);  }### Answer:
@Test public void doGetSplits() { if (!enableTests) { logger.info("doGetSplits: Tests are disabled, to enable them set the 'publishing' environment variable " + "using maven clean install -Dpublishing=true"); return; } logger.info("doGetSplits: enter"); String yearCol = "year"; String monthCol = "month"; String dayCol = "day"; Schema schema = SchemaBuilder.newBuilder() .addIntField(yearCol) .addIntField(monthCol) .addIntField(dayCol) .build(); List<String> partitionCols = new ArrayList<>(); partitionCols.add(yearCol); partitionCols.add(monthCol); partitionCols.add(dayCol); Map<String, ValueSet> constraintsMap = new HashMap<>(); Block partitions = allocator.createBlock(schema); int num_partitions = 10; for (int i = 0; i < num_partitions; i++) { BlockUtils.setValue(partitions.getFieldVector(yearCol), i, 2016 + i); BlockUtils.setValue(partitions.getFieldVector(monthCol), i, (i % 12) + 1); BlockUtils.setValue(partitions.getFieldVector(dayCol), i, (i % 28) + 1); } partitions.setRowCount(num_partitions); String continuationToken = null; GetSplitsRequest originalReq = new GetSplitsRequest(fakeIdentity(), "queryId", "catalog_name", new TableName("schema", "table_name"), partitions, partitionCols, new Constraints(constraintsMap), continuationToken); int numContinuations = 0; do { 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[{}] - splits[{}]", continuationToken, response.getSplits()); for (Split nextSplit : response.getSplits()) { assertNotNull(nextSplit.getProperty("year")); assertNotNull(nextSplit.getProperty("month")); assertNotNull(nextSplit.getProperty("day")); } assertTrue(!response.getSplits().isEmpty()); if (continuationToken != null) { numContinuations++; } } while (continuationToken != null); assertTrue(numContinuations == 0); logger.info("doGetSplits: exit"); }