Rest tests improvement
Merge from upstream/master