add test cases. when raise exception.