/** * {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; int result = 1; result = (prime * result) + ((this.alertingDefinition == null) ? 0 : this.alertingDefinition.hashCode()); result = (prime * result) + ((this.closingReason == null) ? 0 : this.closingReason.hashCode()); result = (prime * result) + ((this.id == null) ? 0 : this.id.hashCode()); result = (prime * result) + (int) (this.startTimestamp ^ (this.startTimestamp >>> 32)); result = (prime * result) + (int) (this.stopTimestamp ^ (this.stopTimestamp >>> 32)); return result; }
properties.put(AlertEMailTemplateType.Placeholders.CLOSING_REASON, alert.getClosingReason().toString());
assertThat(numberFormat.parse(map.get(Placeholders.EXTREME_VALUE)).doubleValue(), is(100D)); assertThat(map.get(Placeholders.END_TIME), not(isEmptyOrNullString())); assertThat(map.get(Placeholders.CLOSING_REASON), is(AlertClosingReason.ALERT_RESOLVED.toString())); assertThat(map.get(Placeholders.TAGS), containsString("k1: appName")); assertThat(map.get(Placeholders.TAGS), containsString("k2: btName"));