update exception
require mockery
clean useless code
add tests