Fix test to actually not catch exception that is supposed to be thrown