update tests to cover exception case