/**
   * check that a crashes during the new session request handling doesn't result in a corrupted
   * state
   */
  @Test(timeout = 1000)
  public void requestIsremovedFromTheQeueAfterItcrashes() throws InterruptedException {
    // should work
    try {
      SeleniumBasedRequest newSession =
          GridHelper.createNewSessionRequest(registry, SeleniumProtocol.WebDriver, ff);
      MockedRequestHandler newSessionRequest =
          new MockedBuggyNewSessionRequestHandler(newSession, null, registry);
      newSessionRequest.process();
    } catch (RuntimeException e) {
      System.out.println(e.getMessage());
    }

    assertEquals(0, registry.getNewSessionRequestCount());
  }