Use Assert::raise().