rishabhdaim commented on code in PR #2261: URL: https://github.com/apache/jackrabbit-oak/pull/2261#discussion_r2066224948
########## oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentSplitTest.java: ########## @@ -104,7 +105,8 @@ public void splitRevisions() throws Exception { // check if document is still there assertNotNull(ns.getNode(Path.ROOT, RevisionVector.fromString(head))); - NodeDocument prevDoc = Iterators.getOnlyElement(doc.getAllPreviousDocs()); + NodeDocument prevDoc = IteratorUtils.get(doc.getAllPreviousDocs(), 0); + assertEquals(1, IteratorUtils.size(doc.getAllPreviousDocs())); Review Comment: Added size check since `Iterators.getOnlyElement` does that as well. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org