[task] Add a UT for exception to repo