bug 829098 add sort to output from middleware call in test