Refactored update test