Add unit tests for testing duplicate calls to save()