If I expect an exception with some cause I can check it with:
exception.expectCause(IsInstanceOf.instanceOf(MyExceptionB.class));
How do I check an exception with a cause with a cause?
I.e. I have an exception MyExceptionA with a cause MyExceptionB with a cause MyExceptionC. How do I check that MyExceptionC was thrown?
You can create an
hasCausematcher and use it withExpectedException