public File[] getFiles(File configRepoCheckoutDirectory, PartialConfigLoadContext context) {
        String pattern = defaultPattern;

        Configuration configuration = context.configuration();
        if (configuration != null) {
            ConfigurationProperty explicitPattern = configuration.getProperty("pattern");
            if (explicitPattern != null) {
                pattern = explicitPattern.getValue();
            }
        }

        return getFiles(configRepoCheckoutDirectory, pattern);
    }
@Test
    public void shouldGetFilesToLoadMatchingPattern() throws Exception {
        GoConfigMother mother = new GoConfigMother();
        PipelineConfig pipe1 = mother.cruiseConfigWithOnePipelineGroup().getAllPipelineConfigs().get(0);

        File file1 = helper.addFileWithPipeline("pipe1.gocd.xml", pipe1);
        File file2 = helper.addFileWithPipeline("pipe1.gcd.xml", pipe1);
        File file3 = helper.addFileWithPipeline("subdir/pipe1.gocd.xml", pipe1);
        File file4 = helper.addFileWithPipeline("subdir/sub/pipe1.gocd.xml", pipe1);

        File[] matchingFiles = xmlPartialProvider.getFiles(tmpFolder, mock(PartialConfigLoadContext.class));

        File[] expected = new File[] {file1, file3, file4};
        assertArrayEquals(expected, matchingFiles, "Matched files are: " + List.of(matchingFiles));
    }