Код: Выделить всё
private final ExecutorService executorService; //(also declared in constructor)
executorService.submit(() -> {
someCool.stuffInHere
});
Код: Выделить всё
@Mock
ExecutorService executorServiceMock
doAnswer(invocationOnMock -> {
testSomeCoolStuffInHere;
}).when(executorServiceMock).submit(() -> any())
Код: Выделить всё
executorServiceMock.submit(CLassName$$LongLambdaAddress) at ClassName
has following stubbings with different arguments
1. executorServiceMock.submit(CLassName$$ADifferentLongLambdaAddress)
Подробнее здесь: https://stackoverflow.com/questions/792 ... th-mockito
Мобильная версия