CF-345: refactored unit tests, separate /metadata tests with actual preferences tests, fix issues with wrongly defined OrderLy