### Question:
PathToSpEL { public static Expression pathToExpression(String path) { return SPEL_EXPRESSION_PARSER.parseExpression(pathToSpEL(path)); }  static Expression pathToExpression(String path); static Expression spelToExpression(String spel); static Expression pathToParentExpression(String path);  }### Answer:
@Test public void listIndex() { Expression expr = PathToSpEL.pathToExpression("/1/description"); List<Todo> todos = new ArrayList<Todo>(); todos.add(new Todo(1L, "A", false)); todos.add(new Todo(2L, "B", false)); todos.add(new Todo(3L, "C", false)); assertEquals("B", (String) expr.getValue(todos)); }
@Test public void listTilde() { Expression expr = PathToSpEL.pathToExpression("/~/description"); List<Todo> todos = new ArrayList<Todo>(); todos.add(new Todo(1L, "A", false)); todos.add(new Todo(2L, "B", false)); todos.add(new Todo(3L, "C", false)); assertEquals("C", (String) expr.getValue(todos)); }