Fixed a test that relied on database exceptions not being wrapped.