@Override
  public boolean matchToken(TokenQueue tokenQueue, List<Token> matchedTokenList) {
    matchedTokenList.add(tokenQueue.poll());
    return true;
  }
@Test
  public void shouldMatch() {
    Token t1 = new Token("a", 1, 1);
    Token t2 = new Token("b", 2, 1);
    TokenQueue tokenQueue = spy(new TokenQueue(Arrays.asList(t1, t2)));
    List<Token> output = mock(List.class);
    AnyTokenMatcher matcher = new AnyTokenMatcher();

    assertThat(matcher.matchToken(tokenQueue, output), is(true));
    verify(tokenQueue).poll();
    verifyNoMoreInteractions(tokenQueue);
    verify(output).add(t1);
    verifyNoMoreInteractions(output);
  }