Write unit tests where you can safely replace object properties and undo the replacement on teardown.  Inspired by perl Test::Resub and python redef