assertNull(futureGet.getData());
}
@Test
public void testRemoveMultipleVersions() throws IOException, NoPeerConnectionException {
NetworkManager nodeA = network.get(random.nextInt(networkSize));
NetworkManager nodeB = network.get(random.nextInt(networkSize));
String locationKey = nodeA.getNodeId();
String contentKey = NetworkTestUtil.randomString();
List<H2HTestData> content = new ArrayList<H2HTestData>();
int numberOfContent = 3;
for (int i = 0; i < numberOfContent; i++) {
H2HTestData data = new H2HTestData(NetworkTestUtil.randomString());
data.generateVersionKey();
if (i > 0) {
data.setBasedOnKey(content.get(i - 1).getVersionKey());
}
Parameters parameters = new Parameters().setLocationKey(locationKey).setContentKey(contentKey)
.setVersionKey(data.getVersionKey()).setData(data);
nodeA.getDataManager().putUnblocked(parameters).awaitUninterruptibly();
content.add(data);
}
boolean success = nodeB.getDataManager().remove(
new Parameters().setLocationKey(locationKey).setContentKey(contentKey));
assertTrue(success);
for (H2HTestData data : content) {
Parameters parameters = new Parameters().setLocationKey(locationKey).setContentKey(contentKey)