static List<String> locateScripts(ArgsMap argsMap) {
    String script = argsMap.get(SCRIPT);
    String scriptDir = argsMap.get(SCRIPT_DIR);

    List<String> scripts = new ArrayList<>();
    if (script != null) {
      StringTokenizer tokenizer = new StringTokenizer(script, ":");
      if (log.isDebugEnabled()) {
        log.debug(
            ((tokenizer.countTokens() == 1) ? "initial script is {}" : "initial scripts are {}"),
            script);
      }
      while (tokenizer.hasMoreTokens()) {
        scripts.add(tokenizer.nextToken());
      }
    }
    if (scriptDir != null) {
      File dir = new File(scriptDir);
      if (dir.isDirectory()) {
        if (log.isDebugEnabled()) {
          log.debug("found scriptdir: {}", dir.getAbsolutePath());
        }
        File[] files = dir.listFiles();
        if (files != null) {
          for (File file : files) {
            scripts.add(file.getAbsolutePath());
          }
        }
      }
    }
    return scripts;
  }
@Test
  void locateScriptsSingle() {
    ArgsMap argsMap = new ArgsMap(new String[] {"script=script1"});
    List<String> scripts = Main.locateScripts(argsMap);

    assertEquals(1, scripts.size());
  }