Add test case for component destruction.