private void assertTimeline(EndsAndHolesPartitionTimeline endsAndHolesPartitionTimeline,
StoreAllPartitionTimeline storeAllPartitionTimeline, UpdatePeriod updatePeriod,
Date first, Date latest, Date... holes) throws LensException {
TimePartition firstPart = TimePartition.of(updatePeriod, first);
TimePartition latestPart = TimePartition.of(updatePeriod, latest);
assertEquals(endsAndHolesPartitionTimeline.getFirst(), firstPart);
assertEquals(endsAndHolesPartitionTimeline.getLatest(), TimePartition.of(updatePeriod, latest));
assertEquals(endsAndHolesPartitionTimeline.getHoles().size(), holes.length);
for (Date date : holes) {
assertTrue(endsAndHolesPartitionTimeline.getHoles().contains(TimePartition.of(updatePeriod, date)));
}
TreeSet<TimePartition> partitions = new TreeSet<>();
for (Date dt : TimeRange.iterable(firstPart.getDate(), latestPart.next().getDate(), updatePeriod, 1)) {
partitions.add(TimePartition.of(updatePeriod, dt));
}
for (Date holeDate : holes) {
partitions.remove(TimePartition.of(updatePeriod, holeDate));
}
assertEquals(storeAllPartitionTimeline.getAllPartitions(), partitions);
}