StorageMemory storeRecv = new StorageMemory();
PeerDHT sender = null;
PeerDHT recv1 = null;
ChannelCreator cc = null;
try {
sender = new PeerBuilderDHT(new PeerBuilder(new Number160("0x50")).p2pId(55).ports(2424).start()).storage(storeSender).start();
recv1 = new PeerBuilderDHT(new PeerBuilder(new Number160("0x20")).p2pId(55).ports(8088).start()).storage(storeRecv).start();
StorageRPC smmSender = sender.storeRPC();
Map<Number160, Data> tmp = new HashMap<Number160, Data>();
byte[] me1 = new byte[] { 1, 2, 3 };
byte[] me2 = new byte[] { 2, 3, 4 };
Data test = new Data(me1);
Data test2 = new Data(me2);
tmp.put(new Number160(77), test);
tmp.put(new Number160(88), test2);
System.err.println(recv1.peerAddress());
FutureChannelCreator fcc = recv1.peer().connectionBean().reservation().create(0, 1);
fcc.awaitUninterruptibly();
cc = fcc.channelCreator();
PutBuilder putBuilder = new PutBuilder(recv1, new Number160(33));
putBuilder.domainKey(Number160.createHash("test"));
putBuilder.versionKey(Number160.ZERO);
putBuilder.dataMapContent(tmp);
putBuilder.versionKey(Number160.ZERO);
FutureResponse fr = smmSender.put(recv1.peerAddress(), putBuilder, cc);
fr.awaitUninterruptibly();
System.err.println(fr.failedReason());
Assert.assertEquals(true, fr.isSuccess());
Number640 key1 = new Number640(new Number160(33), Number160.createHash("test"), new Number160(77), Number160.ZERO);
Data c = storeRecv.get(key1);
Assert.assertEquals(test, c);
//Thread.sleep(10000000);
//
tmp.clear();
me1 = new byte[] { 5, 6, 7 };
me2 = new byte[] { 8, 9, 1, 5 };
test = new Data(me1);
test2 = new Data(me2);
tmp.put(new Number160(77), test);
tmp.put(new Number160(88), test2);
putBuilder.dataMapContent(tmp);
fr = smmSender.put(recv1.peerAddress(), putBuilder, cc);
fr.awaitUninterruptibly();
System.err.println(fr.failedReason());
Assert.assertEquals(true, fr.isSuccess());
Map<Number640, Data> result2 = storeRecv.subMap(key1.minContentKey(), key1.maxContentKey(), -1, true);
Assert.assertEquals(result2.size(), 2);
//Number480 search = new Number480(key, new Number160(88));
Number640 key2 = new Number640(new Number160(33), Number160.createHash("test"), new Number160(88), Number160.ZERO);
c = result2.get(key2);
Assert.assertEquals(c, test2);
} finally {
if (cc != null) {