### Question:
AggregateReader { public void readSnapshots(String aggregateId, long minSequenceNumber, long maxSequenceNumber, int maxResults, Consumer<SerializedEvent> eventConsumer) { snapshotReader.streamByAggregateId(aggregateId, minSequenceNumber, maxSequenceNumber, maxResults > 0 ? maxResults : Integer.MAX_VALUE, eventConsumer); } AggregateReader(EventStorageEngine eventStorageEngine, SnapshotReader snapshotReader); void readEvents(String aggregateId, boolean useSnapshots, long minSequenceNumber,
                           Consumer<SerializedEvent> eventConsumer); void readEvents(String aggregateId, boolean useSnapshots, long minSequenceNumber, long maxSequenceNumber,
                           long minToken,
                           Consumer<SerializedEvent> eventConsumer); void readSnapshots(String aggregateId, long minSequenceNumber, long maxSequenceNumber, int maxResults,
                              Consumer<SerializedEvent> eventConsumer); long readHighestSequenceNr(String aggregateId); long readHighestSequenceNr(String aggregateId, int maxSegmentsHint, long maxTokenHint);  }### Answer:
@Test public void readSnapshots() { List<Long> sequenceNumbers = new ArrayList<>(); testSubject.readSnapshots("55", 10, 50, 10, event -> sequenceNumbers.add(event.getAggregateSequenceNumber())); Assert.assertEquals(2, sequenceNumbers.size()); }
@Test public void readAllSnapshots() { List<Long> sequenceNumbers = new ArrayList<>(); testSubject.readSnapshots("55", 0, Long.MAX_VALUE, 0, event -> sequenceNumbers.add(event.getAggregateSequenceNumber())); Assert.assertEquals(4, sequenceNumbers.size()); }