}
} while (contents.startsWith("#"));
}
search = new TextNavigation("#3", doc);
OdfElement description = search.nextSelection().getElement();
TextParagraphElementBase replacement = (TextParagraphElementBase) description
.getNextSibling();
Assert.assertEquals("Hello2 from source document!",
TextExtractor.getText(replacement));
Paragraph para = Paragraph.getInstanceof(replacement);
String breakBefore = para.getStyleHandler()
.getParagraphPropertiesForRead().getBreakBefore();
Assert.assertNotNull(breakBefore);
description = search.nextSelection().getElement();
replacement = (TextParagraphElementBase) description
.getNextSibling();
Assert.assertEquals("prefix", TextExtractor.getText(replacement));
para = Paragraph.getInstanceof(replacement);
breakBefore = para.getStyleHandler()
.getParagraphPropertiesForRead().getBreakBefore();
Assert.assertNotNull(breakBefore);
replacement = (TextParagraphElementBase) replacement
.getNextSibling();
Assert.assertEquals("Hello2 from source document!",
TextExtractor.getText(replacement));
para = Paragraph.getInstanceof(replacement);
breakBefore = para.getStyleHandler()
.getParagraphPropertiesForRead().getBreakBefore();
Assert.assertNull(breakBefore);
replacement = (TextParagraphElementBase) replacement
.getNextSibling();
Assert.assertEquals("suffix", TextExtractor.getText(replacement));
para = Paragraph.getInstanceof(replacement);
breakBefore = para.getStyleHandler()
.getParagraphPropertiesForRead().getBreakBefore();