unit test exception transformed into an assertion failure