Add test for main context saving in background context