Revise some error in unit test. And support default proxies.

Revise some error in unit test. And support default proxies instead of empty proxy.