public String getStringForDisplay() {
        if (isEmpty()) {
            return "";
        }
        StringBuilder display = new StringBuilder();
        for (IgnoredFiles ignoredFiles : this) {
            display.append(ignoredFiles.getPattern()).append(",");
        }
        return display.substring(0, display.length() - 1);
    }
@Test
    public void shouldConcatenateIgnoredFilesWithCommaWhenDisplaying() {
        Filter filter = new Filter(new IgnoredFiles("/foo/**.*"), new IgnoredFiles("/another/**.*"), new IgnoredFiles("bar"));
        assertThat(filter.getStringForDisplay(), is("/foo/**.*,/another/**.*,bar"));
    }