@Override
    public PartialConfig load(File configRepoCheckoutDirectory, PartialConfigLoadContext context) {
        File[] allFiles = getFiles(configRepoCheckoutDirectory, context);

        // if context had changed files list then we could parse only new content

        PartialConfig[] allFragments = parseFiles(allFiles);

        PartialConfig partialConfig = new PartialConfig();

        collectFragments(allFragments, partialConfig);

        return partialConfig;
    }
@Test
    public void shouldFailToLoadDirectoryWithDuplicatedPipeline() throws Exception {
        GoConfigMother mother = new GoConfigMother();
        PipelineConfig pipe1 = mother.cruiseConfigWithOnePipelineGroup().getAllPipelineConfigs().get(0);

        helper.addFileWithPipeline("pipe1.gocd.xml", pipe1);
        helper.addFileWithPipeline("pipedup.gocd.xml", pipe1);

        try {
            PartialConfig part = xmlPartialProvider.load(tmpFolder, mock(PartialConfigLoadContext.class));
        } catch (Exception ex) {
            assertThat(ex.getMessage(), is("You have defined multiple pipelines called 'pipeline1'. Pipeline names must be unique."));
            return;
        }
        fail("should have thrown");
    }