Adding tests.

Note: One of the test (test_remove) fail.
This is because the remove function doesn't properly delete the cached
value of the @memoize wrapper. Removing the wrapper makes the test fine.