@Test
public void testArrayElementJsonExtractor()
throws Exception
{
ArrayElementJsonExtractor firstExtractor = new ArrayElementJsonExtractor(0, new ScalarValueJsonExtractor());
ArrayElementJsonExtractor secondExtractor = new ArrayElementJsonExtractor(1, new ScalarValueJsonExtractor());
assertEquals(doExtract(firstExtractor, "[]"), null);
assertEquals(doExtract(firstExtractor, "[1, 2, 3]"), "1");
assertEquals(doExtract(secondExtractor, "[1, 2]"), "2");
assertEquals(doExtract(secondExtractor, "[1, null]"), null);