Add unit tests for scope destroy