Add unit tests for saving objects.