Test the data saving and getting mechanism