add test for throw