### Question:
ListProjector extends Projector { @Override public Projection.Inclusion project(Path p, QueryEvaluationContext ctx) { nestedProjector = null; ListIterator<Projector> itemsItr = items.listIterator(items.size()); while (itemsItr.hasPrevious()) { Projector projector = itemsItr.previous(); Projection.Inclusion projectionResult = projector.project(p, ctx); if (projectionResult != Projection.Inclusion.undecided) { nestedProjector = projector.getNestedProjector(); return projectionResult; } } return Projection.Inclusion.undecided; } ListProjector(ProjectionList l, Path ctxPath, FieldTreeNode ctx); @Override Projector getNestedProjector(); List<Projector> getItems(); @Override Projection.Inclusion project(Path p, QueryEvaluationContext ctx);  }### Answer:
@Test public void projection_list() throws Exception { String pr = "[{'field':'field6.*','include':1},{'field':'field5'}]"; Projector projector = projector(pr, md); JsonNode expectedNode = JsonUtils.json("{'field5':true,'field6':{'nf1':'nvalue1','nf2':'nvalue2','nf3':4,'nf4':false,'nf11':null}}".replace('\'', '\"')); JsonDoc newDoc = projector.project(doc, factory); Assert.assertEquals(expectedNode.toString(), newDoc.toString()); }
@Test public void one_$parent_projection_list() throws Exception { String pr = "[{'field':'field7.$parent.field6.*','include':1},{'field':'field5'}]"; Projector projector = projector(pr, md); JsonNode expectedNode = JsonUtils.json("{'field5':true,'field6':{'nf1':'nvalue1','nf2':'nvalue2','nf3':4,'nf4':false,'nf11':null}}".replace('\'', '\"')); JsonDoc newDoc = projector.project(doc, factory); Assert.assertEquals(expectedNode.toString(), newDoc.toString()); }
@Test public void two_$parent_projection_list() throws Exception { String pr = "[{'field':'field7.$parent.field6.*','include':1},{'field':'field5'}]"; Projector projector = projector(pr, md); JsonNode expectedNode = JsonUtils.json("{'field5':true,'field6':{'nf1':'nvalue1','nf2':'nvalue2','nf3':4,'nf4':false,'nf11':null}}".replace('\'', '\"')); JsonDoc newDoc = projector.project(doc, factory); Assert.assertEquals(expectedNode.toString(), newDoc.toString()); }