How to mock HttpClient using Mockito
问题 This is my Actual class for which i am writing junit. I have HtpClient as private and final. public class KMSHttpClientImpl implements KMSHttpClient { /** * ObjectMapper Instance. */ private final ObjectMapper objectMapper = new ObjectMapper (); /** * KMS ConnectionManager Instance. */ private final KMSHttpConnectionManager kmsHttpConnectionManager = new KMSHttpConnectionManagerImpl (); /** * HttpClient object. */ private final HttpClient httpClient; /** * KMSHttpClient constructor. */ public