diff --git oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/UnsavedModifications.java oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/UnsavedModifications.java
index 4c51424..4b983f7 100644
--- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/UnsavedModifications.java
+++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/UnsavedModifications.java
@@ -21,12 +21,13 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.locks.Lock;
 
 import javax.annotation.CheckForNull;
 import javax.annotation.Nonnull;
 
+import org.apache.jackrabbit.oak.plugins.document.util.MapFactory;
 import org.apache.jackrabbit.oak.plugins.document.util.Utils;
 
 import com.google.common.base.Function;
@@ -48,7 +49,7 @@ class UnsavedModifications {
      */
     static final int BACKGROUND_MULTI_UPDATE_LIMIT = 10000;
 
-    private final ConcurrentHashMap<String, Revision> map = new ConcurrentHashMap<String, Revision>();
+    private final ConcurrentMap<String, Revision> map = MapFactory.getInstance().create();
 
     /**
      * Puts a revision for the given path. The revision for the given path is
diff --git oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/MapFactory.java oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/MapFactory.java
new file mode 100644
index 0000000..f26eaa4
--- /dev/null
+++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/MapFactory.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.jackrabbit.oak.plugins.document.util;
+
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+import org.apache.jackrabbit.oak.plugins.document.Revision;
+
+public abstract class MapFactory {
+    private static MapFactory DEFAULT = new MapFactory() {
+        @Override
+        public ConcurrentMap<String, Revision> create() {
+            return new ConcurrentHashMap<String, Revision>();
+        }
+    };
+
+    public abstract ConcurrentMap<String, Revision> create();
+
+    private static MapFactory instance = DEFAULT;
+
+    public static MapFactory getInstance(){
+        return instance;
+    }
+
+    public static void setInstance(MapFactory instance) {
+        MapFactory.instance = instance;
+    }
+}
