### Question:
LineageAdmin { @VisibleForTesting static ScanRangeWithFilter getScanRange(final Set<RunId> runIds) { if (runIds.isEmpty()) { return new ScanRangeWithFilter(0, 0, x -> false); } long earliest = Long.MAX_VALUE; long latest = 0; for (RunId runId : runIds) { long runStartTime = RunIds.getTime(runId, TimeUnit.MILLISECONDS); if (runStartTime < earliest) { earliest = runStartTime; } if (runStartTime > latest) { latest = runStartTime; } } return new ScanRangeWithFilter(earliest, latest + 1, input -> runIds.contains(input.getRun())); } @Inject  LineageAdmin(LineageStoreReader lineageStoreReader, Store store); Lineage computeLineage(DatasetId sourceDataset, long startMillis, long endMillis,
                                int levels, String rollup); Lineage computeLineage(DatasetId sourceDataset, long startMillis, long endMillis, int levels);  }### Answer:
@Test public void testScanRange() { Set<RunId> runIds = ImmutableSet.of( RunIds.generate(500), RunIds.generate(400), RunIds.generate(600), RunIds.generate(200), RunIds.generate(700), RunIds.generate(100) ); LineageAdmin.ScanRangeWithFilter scanRange = LineageAdmin.getScanRange(runIds); Assert.assertEquals(100, scanRange.getStart()); Assert.assertEquals(701, scanRange.getEnd()); scanRange = LineageAdmin.getScanRange(ImmutableSet.of()); Assert.assertEquals(0, scanRange.getStart()); Assert.assertEquals(0, scanRange.getEnd()); scanRange = LineageAdmin.getScanRange(ImmutableSet.of(RunIds.generate(100))); Assert.assertEquals(100, scanRange.getStart()); Assert.assertEquals(101, scanRange.getEnd()); }