Your comments and subsequent answer have revealed the problem. You're trying to mock your exception object. Mockito was not designed to be able to do this. The reason is that exceptions are generally considered to be value objects. They carry around information - a message, a stack trace, sometimes a reference to a second exception; but as a general rule, they don't actually have any functionality.
The purpose of mocking any class is to get an object that has none of its own functionality, that is, none of its methods do anything, except where explicitly implemented within the test. But an exception already fits that criterion, so there is nothing to be gained by mocking it. The advice at http://www.mockobjects.com/2007/04/test-smell-everything-is-mocked.html is good advice indeed.
So, you have a couple of options, both of which will solve your problem nicely.
(1) Create a real exception and use that in your test. Depending on what constructors MyException
has, this might look like this.
MyException toThrow = new MyException("testing");
doThrow(toThrow).when(someMock).someMethod();
(2) Let Mockito create the exception object for you, by just specifying its class in the doThrow
call.
doThrow(MyException.class).when(someMock).someMethod();