Add test case for getting an image from cache