I have the following class:
abstract class Foo {
abstract List<String> getItems();
public void process() {
getItems()
.stream()
.forEach(System.out::println);
}
}
What I'd like to test is the process() method, but it is dependent on the abstract getItems(). One solution can be to just create an ad-hoc mocked class that extends Foo and implements this getItems().
What's the Mockito way to do that?