public NotesWidget()

        {
            VM = new NotesWidgetViewModel();
            VM.Initialize();

            DataContext = VM;

            InitializeComponent();
        }
        public async Task Init()
        {
            jsonStorageControllerMock = new Mock <IJsonStorageController <NotesModel> >();
            jsonStorageControllerMock.Setup(jsonStorageController => jsonStorageController.LoadList()).Returns(Task.FromResult(new List <NotesModel>()));
            jsonStorageControllerMock.Setup(jsonStorageController => jsonStorageController.SaveList(It.IsAny <List <NotesModel> >()));

            jsonStorageServiceMock = new Mock <IJsonStorageService>();
            jsonStorageServiceMock.Setup(jsonStorageService => jsonStorageService.CreateControllerForFile <NotesModel>(It.IsAny <string>())).Returns(jsonStorageControllerMock.Object);

            VM = new NotesWidgetViewModel(jsonStorageServiceMock.Object);
            await VM.Initialize();
        }