ClientRequest request = new ClientRequest(url);
ClientResponse<String> response = request.get(String.class);
String serializedNotifications = response.getEntity();
System.out.println(serializedNotifications);
NotificationLogReader log = new NotificationLogReader(serializedNotifications);
assertFalse(log.isArchived());
assertNotNull(log.id());
assertFalse(log.hasNext());
assertTrue(log.hasSelf());
assertTrue(log.hasPrevious());
int count = 0;
while (log.hasPrevious()) {
++count;
Link previous = log.previous();
request = new ClientRequest(previous.getHref());
response = request.get(String.class);
serializedNotifications = response.getEntity();
//System.out.println(serializedNotifications);
log = new NotificationLogReader(serializedNotifications);
assertTrue(log.isArchived());
assertNotNull(log.id());
assertTrue(log.hasNext());
assertTrue(log.hasSelf());
}
assertTrue(count >= 1);
}