add integration test for garbage collection