### Question:
LandClassLoader extends URLClassLoader { static boolean matchPatterns(String className, List<String> patterns, LandMatcher matcher) { for (String pattern : patterns) { if (matcher.match(className, pattern)) { return true; } } return false; } LandClassLoader(URL[] urls, Map<DelegateType, List<String>> delegateConfig);  LandClassLoader(URL[] urls, Map<DelegateType, List<String>> delegateConfig, ClassLoader parent);  LandClassLoader(URL[] urls, Map<DelegateType, List<String>> delegateConfig, LandMatcher matcher);  LandClassLoader(URL[] urls, Map<DelegateType, List<String>> delegateConfig, LandMatcher matcher, ClassLoader parent); @Override String toString(); static final String CLASS; }### Answer:
@Test public void testMatch_list() throws Exception { List<String> list = Arrays.asList("foo.p1.A", "foo.p2.*", "foo.p3.**"); assertFalse(LandClassLoader.matchPatterns("foo.A", list, matcher)); assertTrue(LandClassLoader.matchPatterns("foo.p1.A", list, matcher)); assertFalse(LandClassLoader.matchPatterns("foo.p1.B", list, matcher)); assertFalse(LandClassLoader.matchPatterns("foo.p1.p.A", list, matcher)); assertTrue(LandClassLoader.matchPatterns("foo.p2.A", list, matcher)); assertFalse(LandClassLoader.matchPatterns("foo.p2.p.A", list, matcher)); assertTrue(LandClassLoader.matchPatterns("foo.p3.A", list, matcher)); assertTrue(LandClassLoader.matchPatterns("foo.p3.p.A", list, matcher)); }