@Test
public void testNFAGivenTwoConsecutiveSkipTillNextMatch() {

    Pattern<String, String> pattern = new QueryBuilder<String, String>()
            .select("first")
                .where(TestMatcher.isEqualTo("A"))
            .then()
            .select("second", Selected.withSkipTilNextMatch())
                .where(TestMatcher.isEqualTo("C"))
            .then()
            .select("latest", Selected.withSkipTilNextMatch())
                .where(TestMatcher.isEqualTo("D"))
            .build();
    final NFA<String, String> nfa = newNFA(pattern);
    List<Sequence<String, String>> s = simulate(nfa, ev1, ev2, ev3, ev4, ev5);
    assertEquals(1, s.size());
    assertNFA(nfa, 2, 1);
    Sequence<String, String> expected = Sequence.<String, String>newBuilder()
            .add("first", ev1)
            .add("second", ev3)
            .add("latest", ev5)
            .build(false);
    assertEquals(expected, s.get(0));
}