@Test
public void queryEventsByCategory() throws Exception {

    int numTenants = 1;
    int numTriggers = 5;
    int numEvents = 5;
    createTestEvents(numTenants, numTriggers, numEvents);
    Set<String> tenantIds = new HashSet<>();
    tenantIds.add("tenant0");
    EventsCriteria criteria = new EventsCriteria();
    criteria.setCategory("category0");
    List<Event> category0Events = alerts.getEvents(tenantIds, criteria, null);
    assertEquals(15, category0Events.size());
    criteria.setCategories(Arrays.asList("category0", "category1"));
    List<Event> category01Events = alerts.getEvents(tenantIds, criteria, null);
    assertEquals(5 * 5, category01Events.size());
    deleteTestEvents(numTenants);
}