Order Verification
It is used to verify the sequence of execution.
Example:
@Test
public void test_Order(){
ArrayList<String> list = Mockito.mock(ArrayList.class);
list.add("added first");
list.add("added second");
InOrder order = Mockito.inOrder(list);
order.verify(list).add("added first");
order.verify(list).add("added second");
}
Here it will verify .add() method first called with "added first" and second time it was called with "added second"