added test to cover user agent validation error