title: JUnit. Parallel running. But all the test methods processing singleton instance. How to solve?
body: <p>So, I have a couple of <code>JUnit</code> classes, each one contains a list of test methods.
  Each method is independent of each other, there is no direct connection.
  But we have indirect connection: all methods processes one singleton object (it is <code>Selenium Web Driver</code> Instance, yes, I use 1 <code>Web Driver</code> Instance for all my tests, because for making new object instance we spend a really lot of time! ).</p>
  
  <p>And It is all ok, when test methods execute step by step in one thread.  But it is too long too,</p>
  
  <p>So, I decided to increase speed, 
  How? -  I decided to run all the test methods in the parallel mode. For this I use maven with the special configuration for parallel test execution.</p>
  
  <p>But I think, it is a source a new problem, because - in result we have parallel methods execution, but we still work just with <strong>single</strong> Web Driver Instance. </p>
  
  <p>I'm trying to find the optimal solution:</p>
  
  <p>I want that the tests will be executed in parallel mode - it is really fast.</p>
  
  <p>I don't want that for every test new object is created - it is a very long process.</p>
  
  <p>What advice can you provide for me?</p>
  
  <p>How would you have solved this problem?</p>