Add test for alerts and fix alerts to pass test.