Definitely save and restore the random seed here.  Even if it's just "for tests", you can't make future maintainers read that.  Better: Don't take a seed parameter at all -- the seed is global^H^H^H^H^H^Ha singleton.  Just directly set the seed in your test code, then call this function.