@Test
public void statusTest() {

    TriggerAction ta = new TriggerAction("tenant", "plugin", "action",
            Collections.singleton(Status.RESOLVED.name()));
    Event event = new Event();
    assertTrue(ActionsValidator.validate(ta, event));
    Alert alert = new Alert();
    assertFalse(ActionsValidator.validate(ta, alert));
    alert.setStatus(Status.ACKNOWLEDGED);
    assertFalse(ActionsValidator.validate(ta, alert));
    alert.setStatus(Status.RESOLVED);
    assertTrue(ActionsValidator.validate(ta, alert));
    Set<String> statuses = new HashSet<>();
    statuses.add(Status.OPEN.name());
    statuses.add(Status.ACKNOWLEDGED.name());
    ta = new TriggerAction("tenant", "plugin", "action", statuses);
    alert = new Alert();
    assertTrue(ActionsValidator.validate(ta, alert));
    alert.setStatus(Status.ACKNOWLEDGED);
    assertTrue(ActionsValidator.validate(ta, alert));
    alert.setStatus(Status.RESOLVED);
    assertFalse(ActionsValidator.validate(ta, alert));
}