Added test for setMessage exception