mockito make mock method throw exception code example
Example: mockito throw exception void method
doThrow(new Exception()).when(mockedObject).methodReturningVoid(...);
doThrow(new Exception()).when(mockedObject).methodReturningVoid(...);