Mockito test RestClient aSync
<p>How to test current method? I cannot reach inner methods like method1, method2.. etc. I am trying to test all inner methods in different test with Mockito. Is that possible?</p>

<pre><code>@Override
public void myMethod(JSONObject json, final Listener listener) {
    StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
    StrictMode.setThreadPolicy(policy);
    RestClientAPI.aSyncPost(url, request, contentType, new JsonHttpResponseHandler() {
        @Override
        public void onStart() {
            super.onStart();
            listener.method1();
        }
        @Override
        public void onSuccess(int statusCode, Header[] headers, JSONObject response) {
            listener.method2(response);
        }
        @Override
        public void onFailure(int statusCode, Header[] headers, final String responseString, Throwable throwable) {
            listener.method3(responseString);
        }
        @Override
        public void onFinish() {
            super.onFinish();
            listener.method4();
        }
    });
}
</code></pre>