Mockito Mock Method That Throws Checked Exception, Mockito provides the thenThrow () method to simulate exceptions when a mocked method is called.