### Question:
PrometheusRecordSet implements RecordSet { @Override public RecordCursor cursor() { return new PrometheusRecordCursor(columnHandles, byteSource); } PrometheusRecordSet(PrometheusClient prometheusClient, PrometheusSplit split, List<PrometheusColumnHandle> columnHandles); @Override List<Type> getColumnTypes(); @Override RecordCursor cursor();  }### Answer:
@Test public void testCursorSimple() { RecordSet recordSet = new PrometheusRecordSet( new PrometheusClient(new PrometheusConnectorConfig(), METRIC_CODEC, TYPE_MANAGER), new PrometheusSplit(dataUri), ImmutableList.of( new PrometheusColumnHandle("labels", varcharMapType, 0), new PrometheusColumnHandle("timestamp", TIMESTAMP_COLUMN_TYPE, 1), new PrometheusColumnHandle("value", DoubleType.DOUBLE, 2))); RecordCursor cursor = recordSet.cursor(); assertEquals(cursor.getType(0), varcharMapType); assertEquals(cursor.getType(1), TIMESTAMP_COLUMN_TYPE); assertEquals(cursor.getType(2), DoubleType.DOUBLE); List<PrometheusStandardizedRow> actual = new ArrayList<>(); while (cursor.advanceNextPosition()) { actual.add(new PrometheusStandardizedRow( (Block) cursor.getObject(0), (Instant) cursor.getObject(1), cursor.getDouble(2))); assertFalse(cursor.isNull(0)); assertFalse(cursor.isNull(1)); assertFalse(cursor.isNull(2)); } List<PrometheusStandardizedRow> expected = ImmutableList.<PrometheusStandardizedRow>builder() .add(new PrometheusStandardizedRow(getBlockFromMap(varcharMapType, ImmutableMap.of("instance", "localhost:9090", "__name__", "up", "job", "prometheus")), ofEpochMilli(1565962969044L), 1.0)) .add(new PrometheusStandardizedRow(getBlockFromMap(varcharMapType, ImmutableMap.of("instance", "localhost:9090", "__name__", "up", "job", "prometheus")), ofEpochMilli(1565962984045L), 1.0)) .add(new PrometheusStandardizedRow(getBlockFromMap(varcharMapType, ImmutableMap.of("instance", "localhost:9090", "__name__", "up", "job", "prometheus")), ofEpochMilli(1565962999044L), 1.0)) .add(new PrometheusStandardizedRow(getBlockFromMap(varcharMapType, ImmutableMap.of("instance", "localhost:9090", "__name__", "up", "job", "prometheus")), ofEpochMilli(1565963014044L), 1.0)) .build(); List<PairLike<PrometheusStandardizedRow, PrometheusStandardizedRow>> pairs = Streams.zip(actual.stream(), expected.stream(), PairLike::new) .collect(Collectors.toList()); pairs.forEach(pair -> { assertEquals(getMapFromBlock(varcharMapType, pair.getFirst().getLabels()), getMapFromBlock(varcharMapType, pair.getSecond().getLabels())); assertEquals(pair.getFirst().getTimestamp(), pair.getSecond().getTimestamp()); assertEquals(pair.getFirst().getValue(), pair.getSecond().getValue()); }); }