add mockery as dev dependency
test and refactor transactional message handler