Tests for saving and loading objects