TagFilter { public Map<String, String> getMap() { return filter; } TagFilter(String filterSpec); Result matchesMap(Map<String, String> tags); Result matchesTaggedResult(Tagged item); boolean matchesTagged(Tagged item); Map<String, String> getMap(); static TagFilter MATCH_ALL; }
@Test public void testTagFilterNameOnly() { TagFilter tf = new TagFilter("name"); assertThat(tf.getMap().size()).isEqualTo(1); assertThat(tf.getMap().containsKey("name")).isTrue(); assertThat(tf.getMap().get("name")).isNull(); }