addUncacheableProviderExpectation(key1,
new ProviderResult(value2, root, true, null));
// Retrieve the object again, this will not fail this time and should
// result in the object being returned.
value = cache.retrieve(key1);
assertSame(value2, value);
// Retrieve the object again, this will use the cached version.
value = cache.retrieve(key1);
assertSame(value2, value);