@@ -0,0 +1,2333 @@
+/*%0A *     Copyright (C) 2015  higherfrequencytrading.com%0A *%0A *     This program is free software: you can redistribute it and/or modify%0A *     it under the terms of the GNU Lesser General Public License as published by%0A *     the Free Software Foundation, either version 3 of the License.%0A *%0A *     This program is distributed in the hope that it will be useful,%0A *     but WITHOUT ANY WARRANTY; without even the implied warranty of%0A *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A *     GNU Lesser General Public License for more details.%0A *%0A *     You should have received a copy of the GNU Lesser General Public License%0A *     along with this program.  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A */%0A%0Apackage net.openhft.chronicle.map;%0A%0Aimport net.openhft.chronicle.hash.replication.TcpTransportAndNetworkConfig;%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Aimport java.io.IOException;%0Aimport java.net.InetSocketAddress;%0Aimport java.util.ArrayList;%0Aimport java.util.Collection;%0Aimport java.util.List;%0Aimport java.util.concurrent.*;%0A%0Aimport static net.openhft.chronicle.map.ChronicleMapStatelessClientBuilder.*;%0A%0Apublic class StatelessClientDuplicateKeyTest %7B%0A%0A    @Test%0A    public void statelessClientDuplicateKeyTest() throws IOException, InterruptedException, ExecutionException %7B%0A        ChronicleMap%3CInteger, Integer%3E map =%0A                ChronicleMapBuilder.of(Integer.class, Integer.class)%0A                .replication((byte) 1, TcpTransportAndNetworkConfig.of(8080))%0A                .create();%0A%0A        map.put(42, 1);%0A%0A        final ChronicleMap%3CInteger, Integer%3E client =%0A                createClientOf(new InetSocketAddress(%22localhost%22, 8080));%0A%0A        ExecutorService runner = new ThreadPoolExecutor(16, 256, 300L, TimeUnit.SECONDS,%0A                new LinkedBlockingDeque%3CRunnable%3E());%0A%0A        class Run implements Callable%3CInteger%3E %7B%0A%0A            @Override%0A            public Integer call() %7B%0A                return client.get(42);%0A            %7D%0A        %7D%0A        Collection%3CRun%3E items = new ArrayList%3C%3E(1000);%0A        for (int i = 0; i %3C 1000; i++) %7B%0A            items.add(new Run());%0A        %7D%0A        List%3CFuture%3CInteger%3E%3E futures = runner.invokeAll(items);%0A        for (Future%3CInteger%3E future : futures) %7B%0A            Assert.assertEquals((Integer) 1, future.get());%0A        %7D%0A    %7D%0A%7D%0A

Add StatelessClientDuplicateKeyTest (see #33)