Improve cache_image testing

Add tests around cache_image functionality to cover other cases:
- A image is already cached
- A image is already cached but we use the parameter force to refresh it.

Change-Id: I9739c2e0d29091d29fa170cf04d953184b8cb54d
Partial-Bug: #1326849
Merge "Improve cache_image testing"