Testing the alert method