Example:
public T f1() {
try{
Object o = new Object();
o.someFunc() // i want to mock this function call to throw an exception (ex) Exception1)
}
catch (Exception1 e) {
throw new Exception2()
}
How would I do this in mockito and verify that I get Exception2 after forcing Exception 1 to be thrown?