Extended test with exception assertion.