Add tests to cover some of the fixed leaks.