added tests for elementupgrade and elementreplace