@Test(expected = InvalidCreateException.class) public void testCreateMetaAlertEmptyGuids() throws InvalidCreateException, IOException { ElasticsearchDao esDao = new ElasticsearchDao(); ElasticsearchMetaAlertDao emaDao = new ElasticsearchMetaAlertDao(); emaDao.init(esDao); MetaAlertCreateRequest createRequest = new MetaAlertCreateRequest(); emaDao.createMetaAlert(createRequest); }
@Test(expected = InvalidCreateException.class) public void testCreateMetaAlertEmptyGroups() throws InvalidCreateException, IOException { ElasticsearchDao esDao = new ElasticsearchDao(); MultiIndexDao miDao = new MultiIndexDao(esDao); ElasticsearchMetaAlertDao emaDao = new ElasticsearchMetaAlertDao(); emaDao.init(miDao); MetaAlertCreateRequest createRequest = new MetaAlertCreateRequest(); createRequest.setAlerts(Collections.singletonList(new GetRequest("don't", "care"))); emaDao.createMetaAlert(createRequest); }