@@ -0,0 +1,2004 @@
+package cucumber.eclipse.editor.editors;%0A%0Aimport static org.hamcrest.CoreMatchers.is;%0Aimport static org.junit.Assert.assertThat;%0A%0Aimport org.eclipse.jface.text.BadLocationException;%0Aimport org.eclipse.jface.text.Document;%0Aimport org.eclipse.jface.text.Position;%0Aimport org.junit.Test;%0A%0Apublic class GherkinModelTest %7B%0A%0A    @Test%0A    public void stepContainerFoldRangeExtendsToNextStepContainer() throws BadLocationException %7B        %0A        String source = %22Feature: x%5Cn%22%0A                + %22%5Cn%22%0A                + %22  Scenario: 1%5Cn%22 // line 2%0A                + %22    Given y%5Cn%22%0A                + %22%5Cn%22%0A                + %22  Scenario: 2%5Cn%22 // line 5%0A                + %22    Given z%5Cn%22;%0A        Document document = new Document(source);%0A        GherkinModel model = new GherkinModel();%0A        %0A        model.updateFromDocument(document);%0A        Position range = model.getFoldRanges().get(0);%0A        %0A        assertThat(%22offset%22, range.getOffset(), is(document.getLineOffset(2)));%0A        assertThat(%22range%22, range.getLength(), is(document.getLineOffset(5) - document.getLineOffset(2)));%0A    %7D%0A    %0A    @Test%0A    public void examplesFoldRangeExtendsToNextStepContainer() throws BadLocationException %7B        %0A        String source = %22Feature: x%5Cn%22%0A                + %22%5Cn%22%0A                + %22  Scenario Outline: 1%5Cn%22%0A                + %22    Given y%5Cn%22%0A                + %22%5Cn%22%0A                + %22    Examples:%5Cn%22 // line 5%0A                + %22      %7C a %7C b %7C%5Cn%22%0A                + %22      %7C 1 %7C 2 %7C%5Cn%22%0A                + %22%5Cn%22%0A                + %22  Scenario: 2%5Cn%22 // line 9%0A                + %22    Given z%5Cn%22;%0A        Document document = new Document(source);%0A        GherkinModel model = new GherkinModel();%0A        %0A        model.updateFromDocument(document);%0A        Position range = model.getFoldRanges().get(0);%0A        %0A        assertThat(%22offset%22, range.getOffset(), is(document.getLineOffset(5)));%0A        assertThat(%22range%22, range.getLength(), is(document.getLineOffset(9) - document.getLineOffset(5)));%0A    %7D%0A%7D%0A

Add tests for fold range calculation.