private RegistryRegulationCommandLineRunner newValidationRunner()

in src/it/java/com/epam/digital/data/platform/registry/regulation/validation/cli/RegistryRegulationCommandLineRunnerTest.java [418:435]


  private RegistryRegulationCommandLineRunner newValidationRunner(ResourceLoader resourceLoader,
      CommandLineArgsParser commandLineArgsParser,
      CommandLineOptionsConverter commandLineOptionsConverter,
      SystemExit systemExit) {
    var validatorFactory = new RegulationValidatorFactory(resourceLoader, new YAMLMapper(),
        new JsonMapper(), settingsYamlRuleBook(), mainLiquibaseRuleBook());

    var elementTemplatePath = Objects.requireNonNull(
            getClass().getClassLoader().getResource("business-process-modeler-element-template.json"))
        .getPath();
    ReflectionTestUtils.setField(validatorFactory, "elementTemplatePath", elementTemplatePath);
    ReflectionTestUtils.setField(validatorFactory, "defaultRoles", List.of("testRole"));

    return new RegistryRegulationCommandLineRunner(commandLineArgsParser,
        commandLineOptionsConverter, systemExit,
        new CommandManager(validatorFactory, commandLineArgsParser, systemExit, openShiftService,
            jsonMapper));
  }