Added a test for memoize.