public void addPipeline(String groupName, PipelineConfig pipeline) {
        String sanitizedGroupName = BasicPipelineConfigs.sanitizedGroupName(groupName);
        if (!this.hasGroup(sanitizedGroupName)) {
            createNewGroup(sanitizedGroupName, pipeline);
            return;
        }
        for (PipelineConfigs pipelines : this) {
            if (pipelines.save(pipeline, sanitizedGroupName)) {
                return;
            }
        }
    }
@Test
    public void shouldReturnTrueWhenGroupNameIsEmptyAndDefaultGroupExists() {
        PipelineConfig existingPipeline = createPipelineConfig("pipeline1", "stage1");
        PipelineConfigs defaultGroup = createGroup("defaultGroup", existingPipeline);
        PipelineGroups pipelineGroups = new PipelineGroups(defaultGroup);
        PipelineConfig newPipeline = createPipelineConfig("pipeline3", "stage1");

        pipelineGroups.addPipeline("", newPipeline);

        assertThat(pipelineGroups.size(), is(1));
        assertThat(defaultGroup, hasItem(existingPipeline));
        assertThat(defaultGroup, hasItem(newPipeline));
    }