use of org.opennms.netmgt.dao.api.AckdConfigurationDao in project opennms by OpenNMS.
the class HypericAckProcessorIT method testStartAckd.
@Test
@JUnitHttpServer(port = 7081)
public void testStartAckd() throws Exception {
AckdConfigurationDao realDao = createAckdConfigDao();
AckdConfigurationDao mockDao = createMock(AckdConfigurationDao.class);
expect(mockDao.getEnabledReaderCount()).andDelegateTo(realDao);
expect(mockDao.isReaderEnabled("JavaMailReader")).andDelegateTo(realDao).times(2);
expect(mockDao.isReaderEnabled("HypericReader")).andDelegateTo(realDao).times(2);
expect(mockDao.getReaderSchedule("HypericReader")).andDelegateTo(realDao).times(2);
replay(mockDao);
m_daemon.setConfigDao(mockDao);
m_daemon.start();
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
}
m_daemon.destroy();
verify(mockDao);
}
Aggregations