fail("did not recieve runtime exception");
}
public void testDispatchAndHealthCheckTimeout() throws Exception {
ClockUtil clock = EasyMock.createMock(ClockUtil.class);
clock.currentTimeMillis();
EasyMock.expectLastCall().andReturn(FAKE_TIME_STAMP); // dispatch
EasyMock.expectLastCall().andReturn(FAKE_TIME_STAMP); // before loop
EasyMock.expectLastCall().andReturn(FAKE_TIME_STAMP); // creating HCI to send to server
// Setup health check fail.
EasyMock.expectLastCall().andReturn(FAKE_TIME_STAMP + 45000); // checking response time + 45 sec