@@ -0,0 +1,1892 @@
+package org.mapdb;%0A%0A%0Aimport org.junit.Test;%0A%0Aimport java.util.Map;%0Aimport java.util.Random;%0Aimport java.util.UUID;%0Aimport java.util.concurrent.Callable;%0Aimport java.util.concurrent.TimeUnit;%0A%0Apublic class HTreeMap_Expiration_Multithreaded %7B%0A%0A    final long duration = 10 * 60 * 1000;%0A%0A    static byte%5B%5D b = new byte%5B100%5D;%0A%0A    @Test public void expireUUID()%7B%0A        if(TT.shortTest())%0A            return;%0A%0A        final long endTime = duration+System.currentTimeMillis();%0A%0A        DB db = DBMaker.memoryDB().cacheSize(10000).make();%0A        final Map m = db.hashMapCreate(%22aa%22)%0A                .keySerializer(Serializer.UUID)%0A                .valueSerializer(Serializer.BYTE_ARRAY)%0A                .expireAfterWrite(1, TimeUnit.MINUTES)%0A                .expireTick(0)%0A                .make();%0A%0A        Exec.execNTimes(10, new Callable() %7B%0A            @Override%0A            public Object call() throws Exception %7B%0A                try %7B%0A                    Random r = new Random(1);%0A                    for (int i = 0; i %3C 2e5; i++) %7B%0A                        UUID u = new UUID(r.nextLong(), r.nextLong());%0A                        m.put(u, b);%0A                    %7D%0A%0A                    while (System.currentTimeMillis()%3CendTime) %7B%0A                        r = new Random(1);%0A                        for (int i = 0; i %3C 1e5; i++) %7B%0A                            UUID u = new UUID(r.nextLong(), r.nextLong());%0A                            m.get(u);%0A                            m.put(u,b);%0A                        %7D%0A                        for (int i = (int) 1e5; i %3C 2e5; i++) %7B%0A                            UUID u = new UUID(r.nextLong(), r.nextLong());%0A                            m.get(u);%0A                        %7D%0A                    %7D%0A                %7Dcatch(Throwable e)%7B%0A                    e.printStackTrace();%0A                %7D%0A                return null;%0A            %7D%0A        %7D);%0A    %7D%0A%7D%0A

Add test for multithreaded expiration