@Test
public void testScheduleWithTimer() {

  Runnable runnable = mock(Runnable.class);
  sessionManager.schedule("test", runnable, 10);
  ArgumentCaptor<SessionManager.RunnableWithTimer> arg = ArgumentCaptor
      .forClass(SessionManager.RunnableWithTimer.class);
  verify(executors).scheduleAtFixedRate(arg.capture(), eq(10L), eq(10L), eq(TimeUnit.SECONDS));
  assertNotNull(arg.getValue().timer);
  assertSame(runnable, arg.getValue().task);
}