unit tests for the cache