@Test
public void shouldProducePlanWhenOrderByClauseIsUsed() {

    schemata = schemataBuilder.addTable("dna:someTable", "column1", "column2", "column3").build();
    query = builder.selectStar().from("dna:someTable AS t1").where().path("t1").isEqualTo(1L).end().orderBy().ascending()
                   .propertyValue("t1", "column1").end().query();
    initQueryContext();
    plan = planner.createPlan(queryContext, query);
    assertThat(problems.hasErrors(), is(false));
    print(plan);
    assertThat(plan.getType(), is(PlanNode.Type.SORT));
    assertThat(plan.getSelectors(), is(selectors("t1")));
}