Erase method added with their respective tests.