### Question:
Alert extends ArchivableEntity { public final void setSeverity(final AlertSeverity severity) { if (severity != null) { this.severity = severity; } } Alert(final String details); protected  Alert(); @XmlElement(name = "device_name") final String getDeviceName(); final void setDeviceName(final String deviceName); String getDisplayTitle(); void setDisplayTitle(final String displayTitle); @XmlElement(name = "details") final String getDetails(); final void setDetails(final String details); @XmlElement(name = "report") final Report getReport(); final void setReport(
            final Report report); final void setPolicyId(final UUID policyId); final UUID getPolicyId(); @XmlElement(name = "baselineIds") final Set<UUID> getBaselineIds(); @XmlAttribute(name = "source") final AlertSource getSource(); final void setSource(final AlertSource source); @XmlAttribute(name = "type") final AlertType getType(); final void setType(final AlertType type); final String getExpected(); final String getReceived(); final void setExpectedAndReceived(final String expected,
            final String received); final void setBaselineIdsAndSeverity(final Set<Baseline> baselines); final void setSeverity(final AlertSeverity severity); final void clearBaseline(); final void clearBaselines(); @XmlAttribute(name = "severity") final AlertSeverity getSeverity(); @Override final String toString();  }### Answer:
@Test public void testSetSeverity() { final AlertSeverity baselineSeverity = AlertSeverity.SEVERE; final AlertSeverity alertSeverity = AlertSeverity.LOW; ImaBaseline baseline = new SimpleImaBaseline(TEST_BASELINE_NAME); baseline.setSeverity(baselineSeverity); HashSet<Baseline> baselineSet = new HashSet<>(); baselineSet.add(baseline); Alert alert = new Alert(TEST_DETAILS); Assert.assertEquals(alert.getSeverity(), AlertSeverity.UNSPECIFIED); alert.setBaselineIdsAndSeverity(baselineSet); Assert.assertEquals(alert.getSeverity(), baselineSeverity); alert.setSeverity(alertSeverity); Assert.assertEquals(alert.getSeverity(), alertSeverity); }