/**
   * @param stateBefore Case state before possible modification and expected state after
   *     modification.
   * @param expectedStateInMock Expected case state during modification.
   * @param mock Mock parser.
   * @param parser Disabled/Enable wrapper around mock parser.
   */
  protected void check(
      boolean stateBefore, boolean expectedStateInMock, MockParser mock, PParser parser) {
    PStringScanner input = new PStringScanner("a");
    PContext context = new PContext();

    context.getDirective().setCaseSensitive(stateBefore);
    parser.process(input, 0, context);

    assertEquals("mock", expectedStateInMock, mock.skip);
    assertEquals("directive", stateBefore, context.getDirective().isCaseSensitive());
  }
 protected PMatch parse(PScanner input, long begin, PContext context) {
   skip = context.getDirective().isCaseSensitive();
   return new PMatch(true, 1);
 }