MDL-46051: Fixing errors in unknown_service_api_called class

Also adding unit tests.