Adds some unit tests for the alert logic