@Test public void testWhenBitmapRetrievalFails_ImageFileContainerIsDeleted() { BitmapRetriever retriever = getRetrieverForCachedImageFileThatFailsRetrieval(); retriever.getBitmap(); verify(fileCachedImage, atLeastOnce()).delete(); }
@Test public void testWhenBitmapRetrievalFails_ReferenceToCachedImageIsRemoved() { BitmapRetriever retriever = getRetrieverForCachedImageFileThatFailsRetrieval(); retriever.getBitmap(); verify(cacheManager, atLeastOnce()).remove(IMAGE_URL); }