### Question:
JavaLexed implements AutoCloseable { public LexicalElement get(int i) { assertOpen(); if( i < 0 || i >= lexicalElements.size()){ return null; } return lexicalElements.get(i); } JavaLexed(Source source); @Override void close(); Iterable<LexicalElement> lexicalElements(); LexicalElement get(int i); LexicalElement remove(int i); void removeRange(int start, int end); int replaceWith(List<LexicalElement>... lists); int replace(MatchResult result, List<LexicalElement>... lists); int replace(int start, int end, List<LexicalElement>... lists); void add(int index, LexicalElement le); int size(); JavaLexed match(BiFunction<JavaLexed, Lexpression, LexMatcher> expression); JavaLexed find(BiFunction<JavaLexed, Lexpression, LexMatcher> expression); JavaLexed sensitivity(int sensitivity); JavaLexed fromStart(); JavaLexed fromIndex(int i); Optional<java.util.regex.MatchResult> regexGroups(final String name); List<javax0.geci.javacomparator.LexicalElement> group(final String name); MatchResult result();  }### Answer:
@Test @DisplayName("Can get a single lexical element by position.") void getsElement() { final var source = new TestSource("public static final"); try(final var sut = new JavaLexed(source)) { final var lexicalElement = sut.get(2); Assertions.assertEquals(javax0.geci.javacomparator.LexicalElement.Type.IDENTIFIER, lexicalElement.getType()); Assertions.assertEquals("static", lexicalElement.getFullLexeme()); } }