refactored unit test, and added PHP-VCR for mocking URL request.
Use PHP-VCR to record URL request in YML format for unit testing.