Updated tests to ensure that the cleanup is called.