@Test public void test_streaming_changes() throws IOException { HttpResponse httpResponse = ResponseOnFileStub.newInstance(200, "changes/changes_full.json"); StreamingChangesResult changes = new StreamingChangesResult(new ObjectMapper(), httpResponse); int i = 0; for (DocumentChange documentChange : changes) { Assert.assertEquals(++i, documentChange.getSequence()); } Assert.assertEquals(5, changes.getLastSeq()); changes.close(); }
public int getSequence() { return node.get(SEQ_FIELD_NAME).intValue(); }
StdDocumentChange implements DocumentChange { public int getSequence() { return node.get(SEQ_FIELD_NAME).intValue(); } }
StdDocumentChange implements DocumentChange { public int getSequence() { return node.get(SEQ_FIELD_NAME).intValue(); } StdDocumentChange(JsonNode node); }
StdDocumentChange implements DocumentChange { public int getSequence() { return node.get(SEQ_FIELD_NAME).intValue(); } StdDocumentChange(JsonNode node); int getSequence(); String getStringSequence(); String getId(); boolean isDeleted(); String getDoc(); JsonNode getDocAsNode(); String getRevision(); List<String> getRevisions(); @Override String toString(); }
StdDocumentChange implements DocumentChange { public int getSequence() { return node.get(SEQ_FIELD_NAME).intValue(); } StdDocumentChange(JsonNode node); int getSequence(); String getStringSequence(); String getId(); boolean isDeleted(); String getDoc(); JsonNode getDocAsNode(); String getRevision(); List<String> getRevisions(); @Override String toString();  }