### Question:
DMNToKotlinMojo extends AbstractDMNMojo<NUMBER, DATE, TIME, DATE_TIME, DURATION, TestCases> { @Override public void execute() throws MojoExecutionException { checkMandatoryField(project, "project"); checkMandatoryField(inputFileDirectory, "inputFileDirectory"); checkMandatoryField(outputFileDirectory, "outputFileDirectory"); checkMandatoryField(dmnDialect, "dmnDialect"); try { BuildLogger logger = new MavenBuildLogger(this.getLog()); Class<?> dialectClass = Class.forName(dmnDialect); DMNDialectDefinition<NUMBER, DATE, TIME, DATE_TIME, DURATION, TestCases> dmnDialect = makeDialect(dialectClass); DMNValidator dmnValidator = makeDMNValidator(this.dmnValidators, logger); DMNTransformer<TestCases> dmnTransformer = makeDMNTransformer(this.dmnTransformers, logger); TemplateProvider templateProvider = makeTemplateProvider(this.templateProvider, logger); LazyEvaluationDetector lazyEvaluationDetector = makeLazyEvaluationDetector(this.lazyEvaluationDetectors, logger, this.inputParameters); TypeDeserializationConfigurer typeDeserializationConfigurer = makeTypeDeserializationConfigurer(this.typeDeserializationConfigurer, logger); validateParameters(dmnDialect, dmnValidator, dmnTransformer, templateProvider, inputParameters); FileTransformer transformer = dmnDialect.createDMNToNativeTransformer( dmnValidator, dmnTransformer, templateProvider, lazyEvaluationDetector, typeDeserializationConfigurer, inputParameters, logger ); transformer.transform(inputFileDirectory.toPath(), outputFileDirectory.toPath()); this.getLog().info(String.format("Transforming '%s' to '%s' ...", this.inputFileDirectory, this.outputFileDirectory)); this.project.addCompileSourceRoot(this.outputFileDirectory.getCanonicalPath()); } catch (Exception e) { throw new MojoExecutionException("", e); } }  @Override void execute(); @Parameter(required = true, defaultValue = "com.gs.dmn.dialect.KotlinStandardDMNDialectDefinition")
    public String dmnDialect; @Parameter(required = false)
    public String[] dmnValidators; @Parameter(required = false)
    public DMNTransformerComponent[] dmnTransformers; @Parameter(required = true, defaultValue = "com.gs.dmn.transformation.template.KotlinTreeTemplateProvider")
    public String templateProvider; @Parameter(required = false)
    public String[] lazyEvaluationDetectors; @Parameter(required = false, defaultValue = "com.gs.dmn.serialization.DefaultTypeDeserializationConfigurer")
    public String typeDeserializationConfigurer; @Parameter(required = false)
    public Map<String, String> inputParameters; @Parameter(required = true, defaultValue = "${project.basedir}/src/main/resources/dmn")
    public File inputFileDirectory; @Parameter(required = true, defaultValue = "${project.build.directory}/generated-sources/dmn")
    public File outputFileDirectory; }### Answer:
@Test(expected = IllegalArgumentException.class) public void testExecuteWhenMissingInput() throws Exception { mojo.inputParameters = makeParams(); mojo.execute(); assertTrue(true); }
@Test public void testExecute() throws Exception { String input = this.getClass().getClassLoader().getResource("input/0004-lending.dmn").getFile(); mojo.project = project; mojo.dmnDialect = StandardDMNDialectDefinition.class.getName(); mojo.dmnValidators = new String[] {NopDMNValidator.class.getName()}; mojo.dmnTransformers = new DMNTransformerComponent[] { new DMNTransformerComponent(ToSimpleNameTransformer.class.getName()) }; mojo.lazyEvaluationDetectors = new String[] {NopLazyEvaluationDetector.class.getName()}; mojo.templateProvider = TreeTemplateProvider.class.getName(); mojo.inputFileDirectory = new File(input); mojo.outputFileDirectory = new File("target/output"); mojo.inputParameters = makeParams(); mojo.execute(); assertTrue(true); }