added test for save functionality of model