added tests to handle bad references (empty response)