cleaned testInsertStatic() and testUpdateStatic() up by extracting the common code as a function.