public void Execute_StoresConsent() { new BestStartGrantBuilder("form").PreviousApplicationFor("*****@*****.**").Insert(); var existingForm = new ChangeOfCircsBuilder("form123") .Insert(); existingForm.UserId.Should().BeNull("no data stored before executing command"); var cmd = new AddIdentity { FormId = "form123", Identity = "*****@*****.**", }; cmd.Execute(); var updatedForm = Repository.Load <ChangeOfCircs>("form123"); updatedForm.UserId.Should().NotBeNull(); updatedForm.UserId.Should().Be(cmd.Identity); }