  @Test
  public void testMediumOplog() throws Exception {

    int oplogSize = 1000;

    List<OplogOperation> oplog = createInsertStream(this::createSimpleInsert)
        .limit(oplogSize)
        .collect(Collectors.toList());
    oplogSupplier = () -> oplog;

    OplogOperation firstOp = oplog.get(0);
    ContinuousOplogFetcher fetcher = factory.createFetcher(firstOp.getHash(), firstOp.getOpTime());

    List<OplogOperation> recivedOplog = new ArrayList<>(oplogSize);
    OplogBatch batch = null;
    while (batch == null || !(batch.isLastOne() || batch.isReadyForMore())) {
      batch = fetcher.fetch();
      recivedOplog.addAll(batch.getOps());
    }

    assertEquals("Unexpected number of oplog entries fetched: ", oplog.size() - 1, recivedOplog
        .size());

    assertEquals(oplog.subList(1, oplog.size()), recivedOplog);
  }