@Test
void testTokenizeForLoop() {

  StringBuilder stringBuilder = new StringBuilder();
  stringBuilder
      .append("{% for item in items %}\n")
      .append("stuff\n")
      .append("{% endfor %}");
  Loader<String> loader = new StringLoader();
  Reader templateReader = loader.getReader(stringBuilder.toString());
  TokenStream tokenStream = this.lexer.tokenize(templateReader, this.TEMPLATE_NAME);
  assertThat(tokenStream.peek(0).getType()).isEqualTo(Type.EXECUTE_START);
  assertThat(tokenStream.peek(0).getValue()).isNull();
  assertThat(tokenStream.peek(1).getType()).isEqualTo(Type.NAME);
  assertThat(tokenStream.peek(1).getValue()).isEqualTo("for");
  assertThat(tokenStream.peek(2).getType()).isEqualTo(Type.NAME);
  assertThat(tokenStream.peek(2).getValue()).isEqualTo("item");
  assertThat(tokenStream.peek(3).getType()).isEqualTo(Type.NAME);
  assertThat(tokenStream.peek(3).getValue()).isEqualTo("in");
  assertThat(tokenStream.peek(4).getType()).isEqualTo(Type.NAME);
  assertThat(tokenStream.peek(4).getValue()).isEqualTo("items");
  assertThat(tokenStream.peek(5).getType()).isEqualTo(Type.EXECUTE_END);
  assertThat(tokenStream.peek(5).getValue()).isEqualTo("%}");
ssertThat(tokenStream.peek(6).getType()).isEqualTo(Type.TEXT);
ssertThat(tokenStream.peek(6).getValue()).isEqualTo("\nstuff\n");
ssertThat(tokenStream.peek(7).getType()).isEqualTo(Type.EXECUTE_START);
ssertThat(tokenStream.peek(7).getValue()).isNull(); 
ssertThat(tokenStream.peek(8).getType()).isEqualTo(Type.NAME);
ssertThat(tokenStream.peek(8).getValue()).isEqualTo("endfor");
ssertThat(tokenStream.peek(9).getType()).isEqualTo(Type.EXECUTE_END);
ssertThat(tokenStream.peek(9).getValue()).isEqualTo("%}");
ssertThat(tokenStream.peek(10).getType()).isEqualTo(Type.EOF);
ssertThat(tokenStream.peek(10).getValue()).isNull(); 
}