I know that one can define an \'expected\' exception in JUnit, doing:
@Test(expect=MyException.class) public void someMethod() { ... }
You could wrap the testing code in a try / catch block, catch the thrown exception, check the internal cause, log / assert / whatever, and then rethrow the exception (if desired).