Added test cases for AutoEditStrategy and fixed a bug.