Add test for proper caching of values.