/** Check that passing to buildSubtree delegates correctly for elements and text. */
public void testOperationFromSubtree() {
Bundle data = new Bundle();
// for element:
DocOpBuffer cursorA = new DocOpBuffer(), cursorB = new DocOpBuffer();
DomOperationUtil.buildDomInitializationFromSubtree(data.D, data.A, cursorA);
DomOperationUtil.buildDomInitializationFromElement(data.D, data.A.asElement(), cursorB, true);
checkCursors(cursorA, cursorB);
// for text:
cursorA = new DocOpBuffer();
cursorB = new DocOpBuffer();
DomOperationUtil.buildDomInitializationFromSubtree(data.D, data.T, cursorA);
DomOperationUtil.buildDomInitializationFromTextNode(data.D, data.T.asText(), cursorB);
checkCursors(cursorA, cursorB);
}