@Test
public void testPutOneLocationKeyMultipleContentKeys() throws Exception {
String locationKey = NetworkTestUtil.randomString();
NetworkManager node = network.get(random.nextInt(networkSize));
String data1 = NetworkTestUtil.randomString();
Parameters parameters1 = new Parameters().setLocationKey(locationKey)
.setContentKey(NetworkTestUtil.randomString()).setData(new H2HTestData(data1));
FuturePut future1 = node.getDataManager().putUnblocked(parameters1);
future1.awaitUninterruptibly();
String data2 = NetworkTestUtil.randomString();
Parameters parameters2 = new Parameters().setLocationKey(locationKey)
.setContentKey(NetworkTestUtil.randomString()).setData(new H2HTestData(data2));
FuturePut future2 = node.getDataManager().putUnblocked(parameters2);
future2.awaitUninterruptibly();
String data3 = NetworkTestUtil.randomString();
Parameters parameters3 = new Parameters().setLocationKey(locationKey)
.setContentKey(NetworkTestUtil.randomString()).setData(new H2HTestData(data3));
FuturePut future3 = node.getDataManager().putUnblocked(parameters3);
future3.awaitUninterruptibly();
FutureGet get1 = node.getDataManager().getUnblocked(parameters1);
get1.awaitUninterruptibly();
String result1 = (String) ((H2HTestData) get1.getData().object()).getTestString();
assertEquals(data1, result1);
FutureGet get2 = node.getDataManager().getUnblocked(parameters2);
get2.awaitUninterruptibly();
String result2 = (String) ((H2HTestData) get2.getData().object()).getTestString();
assertEquals(data2, result2);
FutureGet get3 = node.getDataManager().getUnblocked(parameters3);
get3.awaitUninterruptibly();
String result3 = (String) ((H2HTestData) get3.getData().object()).getTestString();
assertEquals(data3, result3);
}