Is possible mock set so after use in cycle e.g.
for(String key: mySet) { ...}
Thanks.
There is a couple options:
Examples:
Set<String> mySet = (Set<String>) mock(Set.class);
--or--
@Mock
private Set<String> mySet;
@Before
public void doBefore() throws Exception {
MockitoAnnotations.initMocks(this.getClass()); //this should create mocks for your objects...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With