fix test failing(Global object problem)

mock mail notification