<commit_before>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;
      }
    });
  }
}<commit_msg>JasonLeyba: it would help if r9709 had a test that actually passed.<commit_after>package org.openqa.selenium.internal.seleniumemulation;

import junit.framework.TestCase;

import java.util.concurrent.Callable;
import java.util.concurrent.RejectedExecutionException;

public class TimerTest extends TestCase {

  public void testCannotExecuteCommandsAfterStoppingTheTimer() {
    Timer timer = new Timer(250);
    timer.stop();
    try {
      timer.run(new Callable<Void>() {
        public Void call() throws Exception {
          return null;
        }
      });
      fail();
    } catch (RuntimeException ex) {
      Throwable cause = ex.getCause();
      assertNotNull(cause);
      assertTrue(cause instanceof RejectedExecutionException);
    }
  }
}
{'fraction_non_alphanumeric': 0.09531772575250837, 'fraction_numerical': 0.008361204013377926, 'mean_word_length': 3.534090909090909, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2564972', 'n_tokens_mistral': 356, 'n_tokens_neox': 334, 'n_words': 81}