System.out.println("readLastIndex");
String testString = "[$]/";
JPathParser.JPathReader target = new JPathParser.JPathReader(testString);
JPathParser instance = new JPathParser();
LastIndexPredicate expResult = new LastIndexPredicate();
PredicateComponent result = instance.readPredicate(target);
assertEquals(expResult, result);
testString = "[last()]/";
target = new JPathParser.JPathReader(testString);
result = instance.readPredicate(target);
assertEquals(expResult, result);
testString = "[$-1]/";
target = new JPathParser.JPathReader(testString);
result = instance.readPredicate(target);
expResult = new LastIndexPredicate(1);
assertEquals(expResult, result);
testString = "[last()-5]/";
target = new JPathParser.JPathReader(testString);
result = instance.readPredicate(target);
expResult = new LastIndexPredicate(5);
assertEquals(expResult, result);
}