@@ -0,0 +1,1454 @@
+package org.fxmisc.richtext.api;%0A%0Aimport javafx.stage.Stage;%0Aimport org.fxmisc.richtext.InlineCssTextAreaAppTest;%0Aimport org.fxmisc.richtext.TextBuildingUtils;%0Aimport org.junit.Test;%0A%0Aimport java.util.Optional;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Apublic class ParagraphIndexMappingTests extends InlineCssTextAreaAppTest %7B%0A%0A    private static final int TOTAL_NUMBER_OF_LINES = 80;%0A    private static final int LAST_PAR_INDEX = TOTAL_NUMBER_OF_LINES - 1;%0A    private static final String CONTENT = TextBuildingUtils.buildLines(TOTAL_NUMBER_OF_LINES);%0A%0A    @Override%0A    public void start(Stage stage) throws Exception %7B%0A        super.start(stage);%0A        area.replaceText(CONTENT);%0A    %7D%0A%0A    @Test%0A    public void all_par_to_visible_par_index_is_correct() %7B%0A        interact(() -%3E area.showParagraphAtTop(0));%0A        assertEquals(Optional.of(0), area.allParToVisibleParIndex(0));%0A%0A        interact(() -%3E area.showParagraphAtBottom(LAST_PAR_INDEX));%0A        assertEquals(Optional.of(area.getVisibleParagraphs().size() - 1), area.allParToVisibleParIndex(LAST_PAR_INDEX));%0A    %7D%0A%0A    @Test%0A    public void visible_par_to_all_par_index_is_correct() %7B%0A        interact(() -%3E area.showParagraphAtTop(0));%0A        assertEquals(0, area.visibleParToAllParIndex(0));%0A%0A        interact(() -%3E area.showParagraphAtBottom(LAST_PAR_INDEX));%0A        assertEquals(LAST_PAR_INDEX, area.visibleParToAllParIndex(area.getVisibleParagraphs().size() - 1));%0A%0A    %7D%0A%7D%0A

Add test: paragraph index mapping (allPar <-> visiblePar) works