    @Test
    public void testPostWithJson() throws Exception {

        Map<String, String> requestHeaders = new HashMap();
        requestHeaders.put("headerKey1", "headerValue1");
        requestHeaders.put("headerKey2", "headerValue2");
        String postData = "{\"text\": \"hello\"}";
        setResponseData("test".getBytes(CHARSET));

        LineApiResponse<String> responseData = target.postWithJson(
                Uri.parse("https://test"),
                requestHeaders,
                postData,
                new StringResponseParser());

        verify(target).openHttpConnection(Uri.parse("https://test"));
        verify(httpsURLConnection).setRequestMethod("POST");
        verify(httpsURLConnection).setDoOutput(true);
        verify(httpsURLConnection).setRequestProperty("User-Agent", USER_AGENT);
        verify(httpsURLConnection).setRequestProperty("Accept-Encoding", "gzip");
        verify(httpsURLConnection).setRequestProperty("Content-Type", "application/json");
        verify(httpsURLConnection).setRequestProperty("Content-Length", String.valueOf(postData.getBytes().length));
        verify(httpsURLConnection).setRequestProperty("headerKey1", "headerValue1");
        verify(httpsURLConnection).setRequestProperty("headerKey2", "headerValue2");
        verify(httpsURLConnection).setConnectTimeout(CONNECT_TIMEOUT_MILLIS);
        verify(httpsURLConnection).setReadTimeout(READ_TIMEOUT_MILLIS);

        assertEquals(postData, connectionOutputStream.toString(CHARSET));

        assertTrue(responseData.isSuccess());
        assertEquals("test", responseData.getResponseData());
        assertEquals(LineApiError.DEFAULT, responseData.getErrorData());
    }