@Test
public void readMatchedSubstringsArrayTest() throws IOException {

    when(parser.readMatchedSubstringsArray(reader)).thenCallRealMethod();
    when(reader.hasNext()).thenReturn(true, true, true, true, false, true, false, false);
    when(reader.nextName()).thenReturn("length", "offset", "skip");
    when(reader.nextInt()).thenReturn(1, 2);
    List<MatchedSubstring> expected = Arrays.asList(new MatchedSubstring(1, 2), new MatchedSubstring(-1, -1));
    List<MatchedSubstring> actual = parser.readMatchedSubstringsArray(reader);
    assertEquals(expected, actual);
}