@Test
public void testClearCache() throws Exception {

    Mirage mirage = new Mirage(RuntimeEnvironment.application);
    DiskCache diskCache = Mockito.mock(DiskCache.class);
    MemoryCache<String, Bitmap> memoryCache = Mockito.mock(MemoryCache.class);
    mirage.setDefaultDiskCache(diskCache);
    mirage.setDefaultMemoryCache(memoryCache);
    mirage.clearCache();
    Mockito.verify(memoryCache, Mockito.times(1)).clear();
    Mockito.verify(diskCache, Mockito.times(1)).clear();
    mirage.clearMemoryCache();
    Mockito.verify(memoryCache, Mockito.times(2)).clear();
    mirage.clearDiskCache();
    Mockito.verify(diskCache, Mockito.times(2)).clear();
}