### Question:
PrometheusRecordSetProvider implements ConnectorRecordSetProvider { @Override public RecordSet getRecordSet(ConnectorTransactionHandle transaction, ConnectorSession session, ConnectorSplit split, ConnectorTableHandle table, List<? extends ColumnHandle> columns) { PrometheusSplit prometheusSplit = (PrometheusSplit) split; ImmutableList.Builder<PrometheusColumnHandle> handles = ImmutableList.builder(); for (ColumnHandle handle : columns) { handles.add((PrometheusColumnHandle) handle); } return new PrometheusRecordSet(prometheusClient, prometheusSplit, handles.build()); } @Inject  PrometheusRecordSetProvider(PrometheusClient prometheusClient); @Override RecordSet getRecordSet(ConnectorTransactionHandle transaction, ConnectorSession session, ConnectorSplit split, ConnectorTableHandle table, List<? extends ColumnHandle> columns);  }### Answer:
@Test public void testGetRecordSet() { ConnectorTableHandle tableHandle = new PrometheusTableHandle("schema", "table"); PrometheusRecordSetProvider recordSetProvider = new PrometheusRecordSetProvider(client); RecordSet recordSet = recordSetProvider.getRecordSet(PrometheusTransactionHandle.INSTANCE, SESSION, new PrometheusSplit(dataUri), tableHandle, ImmutableList.of( new PrometheusColumnHandle("labels", varcharMapType, 0), new PrometheusColumnHandle("timestamp", TIMESTAMP_COLUMN_TYPE, 1), new PrometheusColumnHandle("value", DoubleType.DOUBLE, 2))); assertNotNull(recordSet, "recordSet is null"); RecordCursor cursor = recordSet.cursor(); assertNotNull(cursor, "cursor is null"); Map<Instant, Map<?, ?>> actual = new LinkedHashMap<>(); while (cursor.advanceNextPosition()) { actual.put((Instant) cursor.getObject(1), getMapFromBlock(varcharMapType, (Block) cursor.getObject(0))); } Map<Instant, Map<String, String>> expected = ImmutableMap.<Instant, Map<String, String>>builder() .put(ofEpochMilli(1565962969044L), ImmutableMap.of("instance", "localhost:9090", "__name__", "up", "job", "prometheus")) .put(ofEpochMilli(1565962984045L), ImmutableMap.of("instance", "localhost:9090", "__name__", "up", "job", "prometheus")) .put(ofEpochMilli(1565962999044L), ImmutableMap.of("instance", "localhost:9090", "__name__", "up", "job", "prometheus")) .put(ofEpochMilli(1565963014044L), ImmutableMap.of("instance", "localhost:9090", "__name__", "up", "job", "prometheus")) .build(); assertEquals(actual, expected); }