Your problem is that you've mocked the ArrayList
, which means that its add
method will do nothing, so s1
and s2
are never in the list. Don't mock ArrayList
- use a real ArrayList
instead.
Also verify(is.findAll(),atLeast(1));
should read verify(is,atLeast(1)).findAll();