@Test
public void shouldAddAccessNodeAboveSourceNode() {

    PlanNode project = new PlanNode(Type.PROJECT, selector("Selector1"));
    PlanNode source = new PlanNode(Type.SOURCE, project, selector("Selector1"));
    // Execute the rule ...
    PlanNode result = rule.execute(context, project, new LinkedList<OptimizerRule>());
    assertThat(result, is(sameInstance(project)));
    PlanNode access = project.getFirstChild();
    assertThat(access.getType(), is(Type.ACCESS));
    assertSelectors(access, "Selector1");
    assertChildren(access, source);
    assertChildren(source);
}