Fixed failing test; use a create-update function instead of locking