Add test to make sure input object is not being modified