Add basic unit test for memory usage.