Add tests for trace#edit