Range r = doc.getRange();
String[] text = new String[r.numParagraphs()];
for (int i = 0; i < r.numParagraphs(); i++) {
Paragraph p = r.getParagraph(i);
text[i] = p.text();
}
assertEquals(p_text.length, text.length);
for (int i = 0; i < p_text.length; i++) {
assertEquals(p_text[i], text[i]);