dispatcher.consume(tokenQueue, statements);
}
@Test
public void shouldConsume() {
TokenMatcher tokenMatcher = mock(TokenMatcher.class);
when(tokenMatcher.matchToken(any(TokenQueue.class), anyListOf(Token.class))).thenReturn(true);
StatementChannel channel = StatementChannel.create(tokenMatcher);
StatementChannelDisptacher dispatcher = new StatementChannelDisptacher(Arrays.asList(channel));
TokenQueue tokenQueue = mock(TokenQueue.class);
when(tokenQueue.peek()).thenReturn(new Token("a", 1, 0)).thenReturn(null);
List<Statement> statements = mock(List.class);