I have a method that will call a service with a Callable implementation. However, I have no idea how to mock this implementation in my test code because the Callable is implemented with lambda expression on the fly. Is there any way i can achieve this?
protected Foo (){
final Callable<MyResponse> myTask = () -> {
MyRequest myRequest = new MyRequest();
Mycliet.call(myRequest);
}
Future<MyResponse> myResponse = executor.submit(myTask);
}
}