@Test
public void sortNameAsc()
{

    Schema schema = schemaService.getDynamicSchema( DataElement.class );
    Query query = Query.from( schema );
    query.setObjects( dataElements );
    query.addOrder( new Order( schema.getProperty( "name" ), Direction.ASCENDING ) );
    List<? extends IdentifiableObject> objects = queryEngine.query( query );
    assertEquals( 6, objects.size() );
    assertEquals( "deabcdefghA", objects.get( 0 ).getUid() );
    assertEquals( "deabcdefghB", objects.get( 1 ).getUid() );
    assertEquals( "deabcdefghC", objects.get( 2 ).getUid() );
    assertEquals( "deabcdefghD", objects.get( 3 ).getUid() );
    assertEquals( "deabcdefghE", objects.get( 4 ).getUid() );
    assertEquals( "deabcdefghF", objects.get( 5 ).getUid() );
}