Added a 100%-covered specs for api/hosts.