### Question:
MediaService { @Optional @Complexity(MEDIUM) public Mono<Video> findVideo(String videoName) { throw new RuntimeException("Not implemented"); }  @Optional @Complexity(MEDIUM) Mono<Video> findVideo(String videoName);  }### Answer:
@Test @SuppressWarnings("unchecked") public void findVideoTest() { List<Server> servers = Servers.list() .stream() .map(MockableServer::new) .collect(Collectors.toList()); PowerMockito.mockStatic(Servers.class); PowerMockito.when(Servers.list()) .thenReturn(servers); MediaService service = new MediaService(); StepVerifier.create(service.findVideo("test")) .expectSubscription() .expectNextCount(1) .verifyComplete(); long count = servers.stream() .map(MockableServer.class::cast) .map(MockableServer::getProbe) .filter(PublisherProbe::wasCancelled) .count(); Assert.assertEquals(servers.size() - 1, count); }