Refactor al alert, refactor al test