verify(schedulerMock);
}
@SuppressWarnings({ "rawtypes", "unchecked" })
public void testStopMonitoringWhenFutureIsNotComplete() {
ScheduledFuture mockFuture = EasyMock.createMock(ScheduledFuture.class);
expect(mockFuture.isCancelled()).andReturn(false);
expect(mockFuture.isDone()).andReturn(false);
expect(mockFuture.cancel(false)).andReturn(true);
ScheduledExecutorService schedulerMock = EasyMock.createMock(ScheduledExecutorService.class);
expect(
schedulerMock.scheduleWithFixedDelay(anyObject(Runnable.class), anyLong(), anyLong(),
anyObject(TimeUnit.class))).andReturn(mockFuture);