added tests for replacing active/nonexistent nodes