Let's say i have the following psuedo like test code:
//Let's import Mockito statically so that the code looks clearer
import static org.mockito.Mockito.*;
//mock creation
List mockedList = mock(List.class);
//using mock object
mockedList.add("one");
mockedList.clear();
//what do these two verify methods do ?
verify(mockedList).add("one");
verify(mockedList).clear();
I keep showing the test passed but i dont know what the verify means ? what is it verifying exactly ? I understand that i mocked a call to add and clear but what does the two verify calls do ?