@@ -0,0 +1,2484 @@
+package cc.redpen.parser.markdown;%0A%0Aimport cc.redpen.parser.LineOffset;%0Aimport org.junit.Test;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Apublic class MergedCandidateSentenceTest %7B%0A    @Test%0A    public void testMerge() %7B%0A        List%3CCandidateSentence%3E candidateSentences = initializeCandidateSentences(%0A                new CandidateSentence(1, %22first %22, %22%22, 0),%0A                new CandidateSentence(1, %22second %22, %22%22, 6),%0A                new CandidateSentence(1, %22third%22, %22%22, 13));%0A%0A        MergedCandidateSentence mergedSentence = MergedCandidateSentence.merge(candidateSentences);%0A        assertEquals(%22first second third%22, mergedSentence.getContents());%0A        List%3CLineOffset%3E expectedOffsets = initializeMappingTable(%0A                new LineOffset(1, 0), // f%0A                new LineOffset(1, 1), // i%0A                new LineOffset(1, 2), // r%0A                new LineOffset(1, 3), // s%0A                new LineOffset(1, 4), // t%0A                new LineOffset(1, 5), // ' '%0A                new LineOffset(1, 6), // s%0A                new LineOffset(1, 7), // e%0A                new LineOffset(1, 8), // c%0A                new LineOffset(1, 9), // o%0A                new LineOffset(1, 10), // n%0A                new LineOffset(1, 11), // d%0A                new LineOffset(1, 12), // ' '%0A                new LineOffset(1, 13), // t%0A                new LineOffset(1, 14), // h%0A                new LineOffset(1, 15), // i%0A                new LineOffset(1, 16), // r%0A                new LineOffset(1, 17)); // d%0A%0A        assertEquals(expectedOffsets.size(), mergedSentence.getOffsetMap().size());%0A        for (int i = 0; i %3C expectedOffsets.size() ; i++) %7B%0A            assertEquals(expectedOffsets.get(i),%0A                    mergedSentence.getOffsetMap().get(i));%0A        %7D%0A%0A    %7D%0A%0A    private static List%3CCandidateSentence%3E initializeCandidateSentences(CandidateSentence... candidateSentences) %7B%0A        List%3CCandidateSentence%3E candidateSentenceList = new ArrayList%3C%3E();%0A        for (CandidateSentence candidateSentence : candidateSentences) %7B%0A            candidateSentenceList.add(candidateSentence);%0A        %7D%0A        return candidateSentenceList;%0A    %7D%0A%0A    private static List%3CLineOffset%3E initializeMappingTable(LineOffset... offsets) %7B%0A        List%3CLineOffset%3E offsetTable = new ArrayList%3C%3E();%0A        for (LineOffset offset : offsets) %7B%0A            offsetTable.add(offset);%0A        %7D%0A        return offsetTable;%0A    %7D%0A%7D%0A

Add a test for merging sentences