@Test(expected = QueryBuildException.class)
public void should_FailOnWrongDirection() throws Exception {

    IObject criteriaMessage = new DSObject("{ \"sort\": [ { \"testField\": 1 } ] }");
    List<IObject> sortMessage = (List<IObject>) criteriaMessage.getValue(new FieldName("sort"));
    orderWriter.write(query, sortMessage);
    fail();
}