* notifying clients of liveness state changes.
*
* @return The corresponding {@link Alert}.
*/
public Alert toAlert() {
AlertSeverity severity;
if (asList(UNHEALTHY, UNKNOWN).contains(this.newState)) {
// only transitions to -> UNHEALTHY/UNKNOWN are warning signs
severity = AlertSeverity.WARN;
} else {
if (this.previousState == UNHEALTHY && this.newState == LIVE) {