Fix issue with using expected exception in tests