@Test
public void testSubmitWithTimer() {

  Runnable runnable = mock(Runnable.class);
  sessionManager.submit("test", runnable);
  ArgumentCaptor<SessionManager.RunnableWithTimer> arg = ArgumentCaptor
      .forClass(SessionManager.RunnableWithTimer.class);
  verify(executors).submit(arg.capture());
  assertNotNull(arg.getValue().timer);
  assertSame(runnable, arg.getValue().task);
}