@Override
    public boolean test(Pickle pickle) {
        String name = pickle.getName();
        return patterns.stream().anyMatch(pattern -> pattern.matcher(name).find());
    }
@Test
    void non_anchored_name_pattern_matches_part_of_name() {
        Pickle pickle = createPickleWithName("a pickle name with suffix");
        NamePredicate predicate = new NamePredicate(singletonList(Pattern.compile("a pickle name")));

        assertTrue(predicate.test(pickle));
    }