public void Init()
        {
            _createPositionMock = new Mock<IProcess<CreatePositionParams, PositionDisplayViewModel>>();
            _createPositionMock.Setup(x => x.Execute(It.IsAny<CreatePositionParams>())).Returns(new PositionDisplayViewModel());

            _verifyTokenMock = new Mock<IProcess<VerifyUserLinkedInAccessTokenParams, UserAccessTokenResultViewModel>>();
            _verifyTokenMock.Setup(x => x.Execute(It.IsAny<VerifyUserLinkedInAccessTokenParams>())).Returns(new UserAccessTokenResultViewModel { AccessTokenValid = true });

            _createCompanyCmdMock = CommandTestUtils.GenerateCreateCompanyCommandMock();
            _createCompanyCmdMock.Setup(x => x.Execute()).Returns(new Company { Id = NEW_COMPANY_ID });

            _companyQueryMock = QueryTestUtils.GenerateCompanyByIdQueryMock();
            _process = new LinkedInPositionSearchProcesses(_context, _verifyTokenMock.Object, _createCompanyCmdMock.Object, _createPositionMock.Object, _companyQueryMock.Object);

            // Initialize user with test (but valid) access token data
            _user = new User { LastVisitedJobSearch = new JobSearch() };
            var oauth = new OAuthData
            {
                Token = "bfcf3fe4-b4d4-4f37-9d32-292ae9d45347",
                Secret = "f66673b2-5877-4fbf-80e0-3826ca9f7eed",
                TokenProvider = TokenProvider.LinkedIn,
                TokenType = TokenType.AccessToken,
            };

            oauth.LinkedInUsers.Add(_user);
            _user.LinkedInOAuthData = oauth;
            _context.Users.Add(_user);
            _context.OAuthData.Add(oauth);
            _context.SaveChanges();
        }
        public void Init()
        {
            _verifyTokenMock = new Mock<IProcess<VerifyUserLinkedInAccessTokenParams,UserAccessTokenResultViewModel>>();
            _verifyTokenMock.Setup(x => x.Execute(It.IsAny<VerifyUserLinkedInAccessTokenParams>())).Returns(new UserAccessTokenResultViewModel { AccessTokenValid = true });

            _createPositionMock = new Mock<IProcess<CreatePositionParams, PositionDisplayViewModel>>();
            var createCompanyCmd = new CreateCompanyCommand(_serviceFactory.Object);

            _process = new LinkedInPositionSearchProcesses(_context, _verifyTokenMock.Object, createCompanyCmd, _createPositionMock.Object, null);

            // Initialize user with test (but valid) access token data
            _user = new User();
            var oauth = new OAuthData
            {
                Token = "bfcf3fe4-b4d4-4f37-9d32-292ae9d45347",
                Secret = "f66673b2-5877-4fbf-80e0-3826ca9f7eed",
                TokenProvider = TokenProvider.LinkedIn,
                TokenType = TokenType.AccessToken,
            };

            oauth.LinkedInUsers.Add(_user);
            _user.LinkedInOAuthData = oauth;
            _context.Users.Add(_user);
            _context.OAuthData.Add(oauth);
            _context.SaveChanges();
        }