Fixed throw in tests