### Question:
StringCollectionUtil { public static void removeMatching(Collection<String> values, String... patterns) { removeMatching(values, Arrays.asList(patterns)); }  static void retainMatching(Collection<String> values,
      String... patterns); static void retainMatching(Collection<String> values,
      Collection<String> patterns); static void removeMatching(Collection<String> values,
      String... patterns); static void removeMatching(Collection<String> values,
      Collection<String> patterns);  }### Answer:
@Test public void testRemoveMatchingWithNoPatterns() throws Exception { Collection<String> values = stringToList("A"); StringCollectionUtil.removeMatching(values); assertTrue(values.contains("A")); }
@Test public void testRemoveMatchingWithMatchingPattern() throws Exception { Collection<String> values = stringToList("A"); StringCollectionUtil.removeMatching(values, "A"); assertTrue(values.isEmpty()); }
@Test public void testRemoveMatchingWithNoMatchingPattern() throws Exception { Collection<String> values = stringToList("A"); StringCollectionUtil.removeMatching(values, "B"); assertTrue(values.contains("A")); }