public static Filter fromDisplayString(String displayString) {
        Filter filter = new Filter();
        String[] ignoredPatterns = displayString.split(",");
        for (String ignoredPattern : ignoredPatterns) {
            filter.add(new IgnoredFiles(ignoredPattern.trim()));
        }
        return filter;
    }
@Test
    public void shouldInitializeFromDisplayString() {
        assertThat(Filter.fromDisplayString("/foo/**.*,/another/**.*,bar"), is(new Filter(new IgnoredFiles("/foo/**.*"), new IgnoredFiles("/another/**.*"), new IgnoredFiles("bar"))));
        assertThat(Filter.fromDisplayString("/foo/**.* , /another/**.*,     bar     "), is(new Filter(new IgnoredFiles("/foo/**.*"), new IgnoredFiles("/another/**.*"), new IgnoredFiles("bar"))));
    }