### Question:
StatisticServiceImpl implements StatisticService { @Override public Flux<StatisticDocument> getAll() { log.debug(() -> "getAll() ->"); return repository.findAll() .takeLast(100); } @Autowired  StatisticServiceImpl(StatisticRepository repository,
                              ShortenerSubscriber shortenerSubscriber,
                              UserSubscriber userSubscriber); void subscribeToEvents(); @Override Flux<StatisticDocument> getAll(); @Override Mono<Long> eventsCount(EventType type);  }### Answer:
@Test public void getAll() { StatisticDocument statisticDocument1 = new StatisticDocument(); statisticDocument1.setId("Stat1"); Mockito.when(repository.findAll()).thenReturn(Flux.just(statisticDocument1)); Flux<StatisticDocument> source = stub.getAll(); StepVerifier.create(source) .expectNext(statisticDocument1) .expectComplete().verify(); }