public PipelineConfigs findGroup(String groupName) {
        for (PipelineConfigs pipelines : this) {
            if (pipelines.isNamed(groupName)) {
                return pipelines;
            }
        }
        throw new RecordNotFoundException(EntityType.PipelineGroup, groupName);
    }
@Test
    public void shouldFindAPipelineGroupByName() {
        PipelineConfig pipeline = createPipelineConfig("pipeline1", "stage1");
        PipelineConfigs defaultGroup = createGroup("defaultGroup", pipeline);
        PipelineGroups pipelineGroups = new PipelineGroups(defaultGroup);

        assertThat(pipelineGroups.findGroup("defaultGroup"), is(defaultGroup));
    }