(final TimerTask task,
final long delay,
final TimeUnit unit)
| 309 | boolean run = true; |
| 310 | |
| 311 | @Override |
| 312 | public Timeout newTimeout(final TimerTask task, |
| 313 | final long delay, |
| 314 | final TimeUnit unit) { |
| 315 | try { |
| 316 | tasks.add(new AbstractMap.SimpleEntry<TimerTask, Long>(task, delay)); |
| 317 | if (run) { |
| 318 | task.run(null); // Argument never used in this code base. |
| 319 | } |
| 320 | final Timeout timeout = mock(Timeout.class); |
| 321 | timeouts.add(timeout); |
| 322 | return timeout; // Return value never used in this code base. |
| 323 | } catch (RuntimeException e) { |
| 324 | throw e; |
| 325 | } catch (Exception e) { |
| 326 | throw new RuntimeException("Timer task failed: " + task, e); |
| 327 | } |
| 328 | } |
| 329 | |
| 330 | @Override |
| 331 | public Set<Timeout> stop() { |
no test coverage detected