[TIMOB-11869] Added the exception unit test.