@Test
public void addNote() throws Exception {

    int numTenants = 1;
    int numTriggers = 1;
    int numAlerts = 5;
    createTestAlerts(numTenants, numTriggers, numAlerts);
    AlertsCriteria criteria = new AlertsCriteria();
    criteria.setStatus(Alert.Status.OPEN);
    List<Alert> openAlerts = alerts.getAlerts("tenant0", criteria, null);
    assertEquals(1, openAlerts.size());
    String alertId = openAlerts.iterator().next().getAlertId();
    alerts.addNote("tenant0", alertId, "xyz1", "Note1");
    Alert alert = alerts.getAlert("tenant0", alertId, false);
    assertEquals(1, alert.getNotes().size());
    alerts.addNote("tenant0", alertId, "xyz2", "Note2");
    alerts.addNote("tenant0", alertId, "xyz3", "Note3");
    alert = alerts.getAlert("tenant0", alertId, false);
    assertEquals(3, alert.getNotes().size());
    deleteTestAlerts(numTenants);
}