add test for exception case