public void StartNewPoemSuccessfulScenario()
        {
            const long AuthorId = 1;
            const long FacebookRequestId = 10;
            var invitedPlayers = new List<long>(new long[] { 2, 3, 4, 5, 6 });
            StartPoemConfiguration configuration = new ClassicalPoemConfiguration(
                AuthorId, "This is a sample title", "This is a sample description", invitedPlayers, FacebookRequestId);
            Mock<IPoemRepository> poemRepository = new Mock<IPoemRepository>();
            poemRepository.Setup(repo => repo.Insert(It.IsAny<Poem>())).Returns(poemRepository.Object);
            poemRepository.Setup(repo => repo.Commit());

            Mock<IUserProfileService> userProfileService = new Mock<IUserProfileService>();
            userProfileService.Setup(repo => repo.GetProfileByUserId(2)).Returns((UserProfile)null);

            Mock<IFacebookProfileProxy> facebookProfileProxy = new Mock<IFacebookProfileProxy>();
            facebookProfileProxy.Setup(proxy => proxy.GetFacebookPublicProfileAsync(2)).Returns(
                Task.Factory.StartNew(
                    () => new FacebookProfile(
                              2,
                              "SampleName",
                              "SampleLastName",
                              "SampleMiddleName",
                              "Name",
                              "Nickname",
                              true,
                              "en-US",
                              "http://facebook.com/2")));

            userProfileService.Setup(service => service.GetProfileByUserId(3)).Returns(new UserProfile());
            userProfileService.Setup(service => service.GetProfileByUserId(4)).Returns(new UserProfile());
            userProfileService.Setup(service => service.GetProfileByUserId(5)).Returns((UserProfile)null);
            userProfileService.Setup(service => service.GetProfileByUserId(6)).Returns(new UserProfile());

            facebookProfileProxy.Setup(proxy => proxy.GetFacebookPublicProfileAsync(5)).Returns(
                Task.Factory.StartNew(
                    () => new FacebookProfile(
                              5,
                              "SampleName",
                              "SampleLastName",
                              "SampleMiddleName",
                              "Name",
                              "Nickname",
                              true,
                              "en-US",
                              "http://facebook.com/5")));

            Mock<IPlayerService> playerService = new Mock<IPlayerService>();
            playerService.Setup(service => service.Insert(It.IsAny<IEnumerable<Player>>()));

            Mock<IPoemRequestService> poemRequestService = new Mock<IPoemRequestService>();
            poemRequestService.Setup(
                service => service.InsertPoemRequests(AuthorId, It.IsAny<long>(), It.IsAny<IEnumerable<long>>()));

            Mock<IEventsRepository> eventsRepository = new Mock<IEventsRepository>();
            eventsRepository.Setup(repo => repo.Insert(It.IsAny<InitialWelcomeEvent>())).Returns(eventsRepository.Object);
            eventsRepository.Setup(repo => repo.Insert(It.IsAny<InvitationToPoemEvent>())).Returns(eventsRepository.Object);
            eventsRepository.Setup(repo => repo.Commit());

            Mock<IEventService> eventsService = new Mock<IEventService>();
            eventsService.Setup(service => service.GetInitialWelcomeEventBuilder()).Returns(
                new InitialWelcomeEventBuilder(eventsRepository.Object));
            eventsService.Setup(service => service.GetInvitationToPoemEventBuilder()).Returns(
                new InvitationToPoemEventBuilder(eventsRepository.Object));

            Mock<IFacebookRequestService> facebookRequestService = new Mock<IFacebookRequestService>();
            facebookRequestService.Setup(service => service.Insert(AuthorId, invitedPlayers, FacebookRequestId)).Returns(new List<FacebookRequest>());

            PoemService poemService = new PoemService(
                poemRepository.Object,
                userProfileService.Object,
                playerService.Object,
                eventsService.Object,
                poemRequestService.Object,
                facebookProfileProxy.Object,
                facebookRequestService.Object);

            poemService.StartNewPoem(configuration);

            poemRepository.VerifyAll();
            userProfileService.VerifyAll();
            facebookProfileProxy.VerifyAll();
            playerService.VerifyAll();
            eventsRepository.VerifyAll();
            eventsService.VerifyAll();
            facebookRequestService.VerifyAll();
            poemRequestService.VerifyAll();
        }
        public ActionResult Start(StartPoemModel startPoem, VerseEngineeringUser user)
        {
            if (!IsStartRequestValid(startPoem, user))
            {
                return View(startPoem);
            }

            if (user == null)
            {
                logger.Error(string.Format("VerseEngineeringUser is null after authorization"));
                return View(startPoem);
            }

            StartPoemConfiguration poemConfig = new ClassicalPoemConfiguration(
                user.UserId,
                startPoem.PoemTitle,
                startPoem.PoemDescription,
                startPoem.FacebookNotificationResponse.To,
                startPoem.FacebookNotificationResponse.Request);

            long poemId = poemService.StartNewPoem(poemConfig);

            return RedirectToAction("Play", new { poemId });
        }