@Test(expectedExceptions = NullPointerException.class, expectedExceptionsMessageRegExp = "timeUnit must not be null when using timeouts")
public void testStartMonitoringWithNullTimeout() {
ScheduledExecutorService schedulerMock = EasyMock.createMock(ScheduledExecutorService.class);
AsyncMonitor<Object> monitor = mockMonitor(schedulerMock, new Object(), mockFunction(MonitorStatus.DONE),
new EventBus());
monitor.startMonitoring(100L, null);
}