@@ -0,0 +1,1188 @@
+package org.mapdb;%0A%0Aimport org.junit.Test;%0A%0Aimport java.util.Map;%0A%0Aimport static org.junit.Assert.assertTrue;%0A%0Apublic class Issue157Test %7B%0A%0A    @Test%0A    public void concurrent_BTreeMap() throws InterruptedException %7B%0A        DBMaker dbMaker = DBMaker.newMemoryDB().cacheDisable().asyncWriteDisable();%0A        DB db = dbMaker.make();%0A        final BTreeMap%3CInteger, String%3E map = db.getTreeMap(%22COL_2%22);%0A        map.clear();%0A%0A        Thread t1 = new Thread() %7B%0A            public void run() %7B%0A                for(int i=0; i%3C=10000; i++) %7B%0A                    map.put(i, %22foo%22);%0A                %7D%0A            %7D%0A        %7D;%0A%0A        Thread t2 = new Thread() %7B%0A            public void run() %7B%0A                for(int i=10000; i%3E=0; i--) %7B%0A                    map.put(i, %22bar%22);%0A                %7D%0A            %7D%0A        %7D;%0A%0A        t1.start();%0A        t2.start();%0A%0A        t1.join();%0A        t2.join();%0A%0A//        map.printTreeStructure();%0A%0A        for(Map.Entry entry : map.entrySet()) %7B%0A//            System.out.println(entry.getKey() + %22 =%3E %22 + entry.getValue());%0A            assertTrue(%22%22+entry.getKey(),%22bar%22.equals(entry.getValue())%7C%7C%22foo%22.equals(entry.getValue()));%0A        %7D%0A%0A%0A%0A    %7D%0A%7D%0A

Add test case for previous commit