package org.openqa.selenium.internal.seleniumemulation;

import junit.framework.TestCase;

import java.util.concurrent.Callable;

public class TimerTest extends TestCase {

  public void testCannotExecuteCommandsAfterStoppingTheTimer() {
    Timer timer = new Timer(250);
    timer.stop();
    timer.run(new Callable<Void>() {
      public Void call() throws Exception {
        return null;
      }
    });
  }
}

@@ -121,16 +121,72 @@
 allable;
+%0Aimport java.util.concurrent.RejectedExecutionException;
 %0A%0Apublic
@@ -339,16 +339,28 @@
 stop();%0A
+    try %7B%0A  
     time
@@ -394,16 +394,18 @@
 %7B%0A      
+ 
+ 
 public V
@@ -442,16 +442,18 @@
         
+  
 return n
@@ -467,18 +467,22 @@
     
-%7D%0A
+  %7D%0A  
     %7D);%0A
   %7D%0A
@@ -477,14 +477,200 @@
     %7D);%0A
+      fail();%0A    %7D catch (RuntimeException ex) %7B%0A      Throwable cause = ex.getCause();%0A      assertNotNull(cause);%0A      assertTrue(cause instanceof RejectedExecutionException);%0A    %7D%0A
   %7D%0A%7D%0A

it would help if r9709 had a test that actually passed.