I'm trying to mock Apache HttpClient Interface in order to mock one of its methods mentioned below to return a stubbed JSON object in response.
HttpResponse response = defaultHttpClient.execute(postRequest);
Could somebody be able to suggest how to achieve this with some sample code? Your help would be greatly appreciated.
Thanks