I'm trying to
unit test the method responsible for adding to map categorized books.
BookSerivceSource is an interface. This interface is implemented by two classes. I'm gonna provide just one, as the second is really similiar.
EmpikSource (one of implementation)
JsoupConnector:
Properties class:
While debugging the test I see that the sources size is 0. How should I add mocked object to the sources list or could you tell me if there is better way to do this?
Test
If adding elements to the list is bad choice, how it should be done?
Greetings,
Peter