MDL-48685 tests: Rewrite useragent tests