Move exception matcher to a utils class