Code example for IsolatedContext

0
    @Override 
    @Before 
    public void setUp() throws Exception { 
        super.setUp(); 
        mMockContext = new IsolatedContext(new MockContentResolver(),
                                           getContext());
    } 
 
    /** 
     * Gets the isolated context created by this class during initialization. 
     * @return The isolated context instance 
     */ 
    protected IsolatedContext getMockContext() {
        return mMockContext;
    } 
}