Test locationForImage and isLocationForImagemethods