fail();
}
long timestamp;
int statusUpdateIdInt = 0;
StatusUpdate statusUpdate;
Node statusUpdateNode;
for (StatusUpdateCreationItem creationItem : creates) {
// set status update identifier
statusUpdate = creationItem.getStatusUpdate();
statusUpdate.setId(String.valueOf(statusUpdateIdInt));
statusUpdateIdInt += 1;
// create status update
timestamp = System.currentTimeMillis();
this.algorithm.createStatusUpdate(timestamp,
creationItem.getUser(), statusUpdate);
// check if status update node exists and contains correct data
statusUpdateNode = NeoUtils
.getStatusUpdateByIdentifier(statusUpdate.getId());
assertEquals(
statusUpdateNode
.getProperty(Properties.StatusUpdate.IDENTIFIER),
statusUpdate.getId());
assertEquals(
statusUpdateNode
.getProperty(Properties.StatusUpdate.TIMESTAMP),
timestamp);
assertEquals(
statusUpdateNode
.getProperty(Properties.StatusUpdate.CONTENT_TYPE),
statusUpdate.getType());
assertEquals(
statusUpdateNode
.getProperty(Properties.StatusUpdate.CONTENT),
statusUpdate.toJSONObject().toJSONString());
// prevent the time stamps from being equal
AlgorithmTest.waitMs(2);
}