public void test() { for (int count = 0; count < numThreads; ++count) { ConcurrentTestRefreshWithOptimisticLocking.threadList[count].start(); } Thread checker = new Thread(new ConcurrentTestRefreshWithOptimisticLocking(true, -1).runnable()); checker.start(); try { checker.join(); } catch (InterruptedException ex) { throw new TestProblemException("Test thread was interrupted. Test failed to run properly"); } }