Code example for MockContext

public class CheckProxyImplTest extends AbstractTest { 
    public void testPostCheck() throws Exception { 
        CallbackAdapter handler = new CallbackAdapter(new MockContext());
        String key = "key1";
        String title = "title1";
        String primaryUrl = "primaryUrl1";
        JSONObject params = new JSONObject();
        params.put("key", key);
        params.put("title", title);
        params.put("primaryUrl", primaryUrl);
        MixiContainer mixiContainer = AndroidMock.createMock(MixiContainer.class);
        mixiContainer.send(AndroidMock.eq("/share"), eqJSONObject(params), AndroidMock.same(handler));
        CheckProxyImpl target = new CheckProxyImpl(mixiContainer);
        target.postCheck(key, title, primaryUrl, handler);
Connect your IDE to all the code out there  Get Codota for Java