public PipelineConfigs getPartWithPipeline(CaseInsensitiveString pipelineName) {
        for (PipelineConfigs part : parts) {
            if (part.hasPipeline(pipelineName))
                return part;
        }
        return null;
    }
@Test
    public void shouldReturnPartWithPipelineWhenExists() {
        PipelineConfig pipe1 = PipelineConfigMother.pipelineConfig("pipeline1");
        BasicPipelineConfigs part1 = new BasicPipelineConfigs(pipe1);
        part1.setOrigin(new FileConfigOrigin());

        MergePipelineConfigs group = new MergePipelineConfigs(
                part1, new BasicPipelineConfigs(PipelineConfigMother.pipelineConfig("pipeline2")));

        assertThat(group.getPartWithPipeline(new CaseInsensitiveString("pipeline1")), Matchers.is(part1));

    }