Added some unit tests for persistance.