@Override
      public Boolean answer(final InvocationOnMock invocation) throws Throwable {
        // Wait for additions to second retry queue from add jobs thread to
        // begin. In case of synchronized access, wait will be for 5 sec.
        // In case of unsynchronized access, this would lead to
        // ConcurrentModificationException.
        latch.await(5000L, TimeUnit.MILLISECONDS);
        return true ;
      }
Tests concurrent operations (fetch and add) on second retry queue.
test/com/linkedin/drelephant/analysis/AnalyticJobGeneratorHadoop2Test.java