catching unchecked exceptions in tests