/// <summary>
        /// Returns a new mock java code generation factory.
        /// </summary>
        private Mock <IJavaCodeGenerationFactory> GetMockJavaCodeGenFactory(
            Type type,
            IJavaModelBuilder javaModelBuilder)
        {
            var javaCodeGenFactory = new Mock <IJavaCodeGenerationFactory>();

            javaCodeGenFactory
            .Setup(factory => factory.CreateBuilder(type))
            .Returns(javaModelBuilder);

            return(javaCodeGenFactory);
        }
        /// <summary>
        /// Returns a new question model factory.
        /// </summary>
        private IQuestionModelFactory GetQuestionModelFactory(
            IJavaModelBuilder javaModelBuilder)
        {
            var javaCodeGenFactory = GetMockJavaCodeGenFactory
                                     (
                typeof(Question),
                javaModelBuilder
                                     );

            return(new QuestionModelFactory
                   (
                       javaCodeGenFactory.Object
                   ));
        }
        /// <summary>
        /// Returns a new question model factory.
        /// </summary>
        private IQuestionModelFactory GetQuestionModelFactory(
            IJavaModelBuilder javaModelBuilder)
        {
            var javaCodeGenFactory = GetMockJavaCodeGenFactory
            (
                typeof(Question),
                javaModelBuilder
            );

            return new QuestionModelFactory
            (
                javaCodeGenFactory.Object
            );
        }
        /// <summary>
        /// Returns a new mock java code generation factory.
        /// </summary>
        private Mock<IJavaCodeGenerationFactory> GetMockJavaCodeGenFactory(
            Type type,
            IJavaModelBuilder javaModelBuilder)
        {
            var javaCodeGenFactory = new Mock<IJavaCodeGenerationFactory>();

            javaCodeGenFactory
                .Setup(factory => factory.CreateBuilder(type))
                .Returns(javaModelBuilder);

            return javaCodeGenFactory;
        }