Fixed broken tests (JSON parsing issues). Added more test to ClientIntegrationTest including a test for SSL.