Make a save function on the user object, and some tests