class StubConfigPathProvider {

    public List<String> getConfigPathsFromSpecificFolder(final String sourceFolderPath, final String pattern) {
        List<String> resultPaths = new ArrayList<>();
        if (!pattern.contains("*")) {
            String specificFilePath;
            if ("".equals(sourceFolderPath)) {
                specificFilePath = pattern;
            } else {
                specificFilePath = FilenameUtils.separatorsToSystem(sourceFolderPath + "/" + pattern);
            }
            resultPaths.add(specificFilePath);
        } else {
            File folder = new File(sourceFolderPath);
            folder = folder.getAbsoluteFile();
            int cutFromHere = pattern.indexOf("*") + 1;
            String endOfFiles = pattern.substring(cutFromHere);
            for (File file : fileUtils.listFilesWithFilter(folder, "^(.+)" + endOfFiles + "$")) {
                resultPaths.add(file.getPath());
            }
        }
        return resultPaths;
    }

}