Fixed tests cases of Cache.