We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16971df commit c8fc29eCopy full SHA for c8fc29e
server/src/test/java/org/elasticsearch/indices/IndicesServiceTests.java
@@ -619,8 +619,8 @@ public void testStatsByShardDoesNotDieFromExpectedExceptions() {
619
}
620
621
622
- when(mockIndicesService.iterator()).thenReturn(Collections.singleton(indexService).iterator());
623
- when(indexService.iterator()).thenReturn(shards.iterator());
+ when(mockIndicesService.iterator()).thenAnswer(invocation -> Collections.singleton(indexService).iterator());
+ when(indexService.iterator()).thenAnswer(unused -> shards.iterator());
624
when(indexService.index()).thenReturn(index);
625
626
// real one, which has a logger defined
0 commit comments