package test.thread;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

public class Helper {
  private static Map<String, Map<Long, Long>> m_maps = new HashMap<>();

  public static Map<Long, Long> getMap(String className) {
    synchronized(m_maps) {
      Map<Long, Long> result = m_maps.get(className);
      if (result == null) {
        result = Collections.synchronizedMap(new HashMap<Long, Long>());
        m_maps.put(className, result);
      }
      return result;
    }
//    System.out.println("Putting class:" + className + " result:" + result);

  }

  public static void reset() {
    m_maps = new HashMap<>();
  }
}

@@ -21,39 +21,8 @@
 %0D%0A%0D%0A
-import java.util.Collections;%0D%0A
 impo
@@ -347,16 +347,174 @@
         
+// TODO a synchronizedMap will break MultiThreadedDependentSampleTest%0D%0A        // a not synchronizedMap will __sometimes__ break ParallelITestTest%0D%0A        //
 result =
@@ -567,24 +567,59 @@
  Long%3E());%0D%0A
+        result = new HashMap%3C%3E();%0D%0A
         m_ma

Fix MultiThreadedDependentSampleTest