Added test for the new function and the new exception added