How to mock void methods with Mockito
How to mock methods with void return type? I implemented an observer pattern but I can’t mock it with Mockito because I don’t know how. And I tried to find an example on the Internet but didn’t succeed. My class looks like this: public class World { List<Listener> listeners; void addListener(Listener item) { listeners.add(item); } … Read more