unit test for service getting error