//[Inject]
        //private readonly ITestGenericService _testService;
        /// <summary>
        /// Constructor for configuration + diagnostic controller.  Creates computation objects 
        /// via dependency injection.
        /// </summary>
        /// <param name="lciaComputationV2"></param>
        /// <param name="fragmentLCIAComputation"></param>
        /// <param name="cacheManager"></param>
        /// <param name="scenarioGroupService"></param>
        /// <param name="resourceService"></param>
        public ConfigurationController(
            ILCIAComputationV2 lciaComputationV2, 
            IFragmentLCIAComputation fragmentLCIAComputation,
            ICacheManager cacheManager,
            IScenarioGroupService scenarioGroupService,
            IResourceServiceFacade resourceService)
        {
            if (lciaComputationV2 == null)
            {
                throw new ArgumentNullException("lciaComputationV2 is null");
            }

            _lciaComputationV2 = lciaComputationV2;

            if (fragmentLCIAComputation == null)
            {
                throw new ArgumentNullException("fragmentLCIAComputation is null");
            }

            _fragmentLCIAComputation = fragmentLCIAComputation;

            if (cacheManager == null)
            {
                throw new ArgumentNullException("cacheManager is null");
            }

            _CacheManager = cacheManager;
            _scenarioGroupService = scenarioGroupService;
            _resourceService = resourceService;

            /*
            if (testGenericService == null)
            {
                throw new ArgumentNullException("testGenericService is null");
            }

            _testService = testGenericService;
             * */
        }
        public void SetUp()
        {
            _mockCategoryRepository = new Mock<IRepositoryAsync<Category>>();
            _mockClassificationRepository = new Mock<IRepositoryAsync<Classification>>();
            _mockFlowRepository = new Mock<IRepositoryAsync<Flow>>();
            _mockFlowPropertyRepository = new Mock<IRepositoryAsync<FlowProperty>>();
            _mockFlowTypeRepository = new Mock<IRepositoryAsync<FlowType>>();
            _mockFragmentRepository = new Mock<IRepositoryAsync<Fragment>>();
            _mockFragmentFlowRepository = new Mock<IRepositoryAsync<FragmentFlow>>();
            _mockFragmentStageRepository = new Mock<IRepositoryAsync<FragmentStage>>();
            _mockImpactCategoryRepository = new Mock<IRepositoryAsync<ImpactCategory>>();
            _mockLCIAMethodRepository = new Mock<IRepositoryAsync<LCIAMethod>>();
            _mockNodeCacheRepository = new Mock<IRepositoryAsync<NodeCache>>();
            _mockProcessRepository = new Mock<IRepositoryAsync<Process>>();
            _mockProcessFlowRepository = new Mock<IRepositoryAsync<ProcessFlow>>();
            _mockScenarioRepository = new Mock<IRepositoryAsync<Scenario>>();
            _mockScenarioGroupRepository = new Mock<IRepositoryAsync<ScenarioGroup>>();
            _mockFragmentNodeProcessRepository = new Mock<IRepositoryAsync<FragmentNodeProcess>>();
            _mockFragmentNodeFragmentRepository = new Mock<IRepositoryAsync<FragmentNodeFragment>>();
            _mockFlowFlowPropertyRepository = new Mock<IRepositoryAsync<FlowFlowProperty>>();
            _mockDependencyParamRepository = new Mock<IRepositoryAsync<DependencyParam>>();
            _mockFlowPropertyParamRepository = new Mock<IRepositoryAsync<FlowPropertyParam>>();
            _mockParamRepository = new Mock<IRepositoryAsync<Param>>();
            _mockScoreCacheRepository = new Mock<IRepositoryAsync<ScoreCache>>();
            _mockProcessSubstitutionRepository = new Mock<IRepositoryAsync<ProcessSubstitution>>();
            _mockFragmentSubstitutionRepository = new Mock<IRepositoryAsync<FragmentSubstitution>>();
            _mockBackgroundSubstitutionRepository = new Mock<IRepositoryAsync<BackgroundSubstitution>>();
            _mockBackgroundRepository = new Mock<IRepositoryAsync<Background>>();
            _mockProcessEmissionParamRepository = new Mock<IRepositoryAsync<ProcessEmissionParam>>();
            _mockFlowPropertyEmissionRepository = new Mock<IRepositoryAsync<FlowPropertyEmission>>();
            _mockProcessDissipationRepository = new Mock<IRepositoryAsync<ProcessDissipation>>();
            _mockProcessDissipationParamRepository = new Mock<IRepositoryAsync<ProcessDissipationParam>>();
            _mockLCIARepository = new Mock<IRepositoryAsync<LCIA>>();
            _mockCharacterizationParamRepository = new Mock<IRepositoryAsync<CharacterizationParam>>();
            _mockUnitOfWork = new Mock<IUnitOfWork>();

            //we do need to pass a mock repository to all these services as the ResourceController
            //expects the resource facade to be passed to it.  In turn the resource facade takes these
            //service types and methods.
            _flowTypeService = new FlowTypeService(_mockFlowTypeRepository.Object);
            //_categoryService = new CategoryService(_mockCategoryRepository.Object);
            //_classificationService = new ClassificationService(_mockClassificationRepository.Object);
            _fragmentService = new FragmentService(_mockFragmentRepository.Object);
            _fragmentFlowService = new FragmentFlowService(_mockFragmentFlowRepository.Object);
            //_fragmentStageService = new FragmentStageService(_mockFragmentStageRepository.Object);
            _flowService = new FlowService(_mockFlowRepository.Object);
            _flowPropertyService = new FlowPropertyService(_mockFlowPropertyRepository.Object);
            _impactCategoryService = new ImpactCategoryService(_mockImpactCategoryRepository.Object);
            _lciaMethodService = new LCIAMethodService(_mockLCIAMethodRepository.Object);
            _processService = new ProcessService(_mockProcessRepository.Object);
            _processFlowService = new ProcessFlowService(_mockProcessFlowRepository.Object);
            _scenarioService = new ScenarioService(_mockScenarioRepository.Object);
            _scenarioGroupService = new ScenarioGroupService(_mockScenarioGroupRepository.Object);
            _nodeCacheService = new NodeCacheService(_mockNodeCacheRepository.Object);
            //_fragmentNodeProcessService = new FragmentNodeProcessService(_mockFragmentNodeProcessRepository.Object);
            //_fragmentNodeFragmentService = new FragmentNodeFragmentService(_mockFragmentNodeFragmentRepository.Object);
            _flowFlowPropertyService = new FlowFlowPropertyService(_mockFlowFlowPropertyRepository.Object);
            //_dependencyParamService = new DependencyParamService(_mockDependencyParamRepository.Object);
            //_flowPropertyParamService = new FlowPropertyParamService(_mockFlowPropertyParamRepository.Object);
            //_flowPropertyParamService = new FlowPropertyParamService(_mockFlowPropertyParamRepository.Object);
            _paramService = new ParamService(_mockParamRepository.Object);
            _scoreCacheService = new ScoreCacheService(_mockScoreCacheRepository.Object);
            //_processSubstitutionService = new ProcessSubstitutionService(_mockProcessSubstitutionRepository.Object);
            //_fragmentSubstitutionService = new FragmentSubstitutionService(_mockFragmentSubstitutionRepository.Object);
            //_backgroundSubstitutionService = new BackgroundSubstitutionService(_mockBackgroundSubstitutionRepository.Object);
            //_backgroundService = new BackgroundService(_mockBackgroundRepository.Object);
            //_processEmissionParamService = new ProcessEmissionParamService(_mockProcessEmissionParamRepository.Object);
            //_flowPropertyEmissionService = new FlowPropertyEmissionService(_mockFlowPropertyEmissionRepository.Object);
            _processDissipationService = new ProcessDissipationService(_mockProcessDissipationRepository.Object);
            //_processDissipationParamService = new ProcessDissipationParamService(_mockProcessDissipationParamRepository.Object);
            _lciaService = new LCIAService(_mockLCIARepository.Object);
            //_characterizationParamService = new CharacterizationParamService(_mockCharacterizationParamRepository.Object);
            _unitOfWork = _mockUnitOfWork.Object;

            //methods that resource service facade is dependent on.
            _fragmentTraversalV2 = new FragmentTraversalV2(
                _fragmentFlowService,
                _nodeCacheService,
                _processFlowService,
                _flowFlowPropertyService);

            _lciaComputation = new LCIAComputationV2(_processFlowService,
                //_processEmissionParamService,
            _lciaMethodService,
            _flowService,
                //_flowFlowPropertyService,
                //_flowPropertyParamService,
                //_flowPropertyEmissionService,
            _processDissipationService,
                //_processDissipationParamService,
            _lciaService);
            //_characterizationParamService,
            //_paramService);

            _fragmentLCIAComputation = new FragmentLCIAComputation(_fragmentTraversalV2,
                _lciaComputation,
                _fragmentFlowService,
                _scoreCacheService,
                _nodeCacheService,
            //_fragmentNodeProcessService,
            //_processSubstitutionService,
            //_fragmentNodeFragmentService,
            //_fragmentSubstitutionService,
                _lciaMethodService,
                _fragmentService,
                _scenarioService,
                _processFlowService,
            _unitOfWork);

            _resourceServiceFacade = new ResourceServiceFacade(
                               _fragmentService,
                               _fragmentFlowService,
                               _fragmentStageService,
                               _fragmentLCIAComputation,
                               _flowService,
                               _flowPropertyService,
                               _flowTypeService,
                               _impactCategoryService,
                               _lciaComputation,
                               _lciaMethodService,
                               _processService,
                               _processFlowService,
                               _scenarioService,
                               _paramService,
                               _flowFlowPropertyService,
                               _lciaService,
                               _cacheManager);

            _docuService = new DocuService();
            _cacheManager = new CacheManager(
                _scenarioService,
                _unitOfWork,
                _fragmentService,
                _fragmentLCIAComputation,
                _nodeCacheService,
                _scoreCacheService,
                _scenarioGroupService);

            _resourceController = new ResourceController(_resourceServiceFacade, _scenarioService, _scenarioGroupService, _docuService, _paramService);
        }