void () { final CollectionPattern<String> filter = collection(String.class); assertTrue(filter.size(0).accepts(Arrays.<String>asList())); assertFalse(filter.size(0).accepts(Arrays.asList("abc"))); assertFalse(filter.size(0).accepts(Arrays.asList("abc", "abc"))); assertFalse(filter.size(1).accepts(Arrays.<String>asList())); assertTrue(filter.size(1).accepts(Arrays.asList("abc"))); assertFalse(filter.size(1).accepts(Arrays.asList("abc", "abc"))); assertFalse(filter.size(2).accepts(Arrays.<String>asList())); assertFalse(filter.size(2).accepts(Arrays.asList("abc"))); assertTrue(filter.size(2).accepts(Arrays.asList("abc", "abc"))); }