Added corresponding test for List#modify, and updated modify method to make test pass.