### Question:
LogIndexer { public List<Log> getLogs(long from, long offset) { long start = from < 0 ? 0 : from; long end = start + offset > curIndex() ? curIndex() : start + offset; return LongStream.rangeClosed(start, end).mapToObj(this::getLog).collect(Collectors.toList()); } LogIndexer(LogStore logStore, ReceiptStore receiptStore); void put(String txId, int size); String get(long logIndex); Log getLog(long logIndex); List<Log> getLogs(long from, long offset); long curIndex(); boolean contains(long logIndex); void close();  }### Answer:
@Test public void getLogsTest() { int i = 0; for (Log log : logIndexer.getLogs(0, 9)) { assertEquals(String.format(logFormat, i++), log.getMsg()); } }