@Test
public void queryAlertsByTriggerId() throws Exception {

    int numTenants = 2;
    int numTriggers = 5;
    int numAlerts = 5;
    createTestAlerts(numTenants, numTriggers, numAlerts);
    Set<String> tenantIds = new HashSet<>();
    tenantIds.add("tenant0");
    tenantIds.add("tenant1");
    AlertsCriteria criteria = new AlertsCriteria();
    criteria.setTriggerId("trigger0");
    List<Alert> trigger0Alerts = alerts.getAlerts(tenantIds, criteria, null);
    assertEquals(10, trigger0Alerts.size());
    criteria.setTriggerIds(Arrays.asList("trigger0", "trigger1", "trigger2"));
    List<Alert> trigger012Alerts = alerts.getAlerts(tenantIds, criteria, null);
    assertEquals(30, trigger012Alerts.size());
    deleteTestAlerts(numTenants);
}