Delete element function is working with test cases.