@Test void testDetermineModuleIfModuleIsNotSet() { ModuleDeterminer moduleDeterminer = createModuleDeterminer(); DeploymentDescriptor completeDeploymentDescriptor = createDeploymentDescriptor(); Module moduleToDeploy = createModule("some-module-name"); completeDeploymentDescriptor.setModules(List.of(moduleToDeploy)); context.setVariable(Variables.COMPLETE_DEPLOYMENT_DESCRIPTOR, completeDeploymentDescriptor); context.setVariable(Variables.APP_TO_PROCESS, createApplication("app-to-process", "some-module-name", null)); context.setVariable(Variables.MTA_MAJOR_SCHEMA_VERSION, 3); Module module = moduleDeterminer.determineModuleToDeploy(); Assertions.assertEquals("some-module-name", module.getName()); }
public Module determineModuleToDeploy() { Module moduleToDeploy = getContext().getVariable(Variables.MODULE_TO_DEPLOY); return moduleToDeploy != null ? moduleToDeploy : determineModule(); }
ModuleDeterminer { public Module determineModuleToDeploy() { Module moduleToDeploy = getContext().getVariable(Variables.MODULE_TO_DEPLOY); return moduleToDeploy != null ? moduleToDeploy : determineModule(); } }
ModuleDeterminer { public Module determineModuleToDeploy() { Module moduleToDeploy = getContext().getVariable(Variables.MODULE_TO_DEPLOY); return moduleToDeploy != null ? moduleToDeploy : determineModule(); }  }
ModuleDeterminer { public Module determineModuleToDeploy() { Module moduleToDeploy = getContext().getVariable(Variables.MODULE_TO_DEPLOY); return moduleToDeploy != null ? moduleToDeploy : determineModule(); }  Module determineModuleToDeploy(); abstract MtaMetadataParser getMtaMetadataParser(); abstract ProcessContext getContext(); }
ModuleDeterminer { public Module determineModuleToDeploy() { Module moduleToDeploy = getContext().getVariable(Variables.MODULE_TO_DEPLOY); return moduleToDeploy != null ? moduleToDeploy : determineModule(); }  Module determineModuleToDeploy(); abstract MtaMetadataParser getMtaMetadataParser(); abstract ProcessContext getContext();  }