@Test
public void testLexicon_caseInsensitive() {

  List<String> keywords = asList("foo", "Bar");
  Lexicon lexicon = Keywords.lexicon(
      Scanners.IDENTIFIER, keywords, StringCase.CASE_INSENSITIVE, TokenizerMaps.IDENTIFIER_FRAGMENT);
  for (String keyword : keywords) {
    assertEquals(Tokens.reserved(keyword), lexicon.word(keyword));
    assertEquals(Tokens.reserved(keyword), lexicon.word(keyword.toUpperCase()));
  }
  for (String keyword : keywords) {
    assertEquals(Tokens.reserved(keyword), lexicon.tokenizer.parse(keyword));
    assertEquals(Tokens.reserved(keyword), lexicon.tokenizer.parse(keyword.toUpperCase()));
  }
  assertEquals(Tokens.identifier("baz"), lexicon.tokenizer.parse("baz"));
}