Code example for IsolatedContext

0
 
    @Override 
    protected void setUp() throws Exception { 
        super.setUp(); 
        final MockContentResolver mcr = new MockContentResolver();
        setContext(new IsolatedContext(mcr, getContext()));
 
    } 
 
    public void testSync() { 
        // startService(new Intent(getContext(), SyncService.class)); 
        // final SyncService svc = getService(); 
        // 
        // assertNotNull(svc); 
 
    } 
 
 
}