### Question:
ResolverUtil { @SuppressWarnings("unchecked") protected void addIfMatching(Test test, String fqn) { try { String externalName = fqn.substring(0, fqn.indexOf('.')).replace('/', '.'); ClassLoader loader = getClassLoader(); if (log.isDebugEnabled()) { log.debug("Checking to see if class " + externalName + " matches criteria [" + test + "]"); } Class<?> type = loader.loadClass(externalName); if (test.matches(type)) { matches.add((Class<T>) type); } } catch (Throwable t) { log.warn("Could not examine class '" + fqn + "'" + " due to a " + t.getClass().getName() + " with message: " + t.getMessage()); } }  Set<Class<? extends T>> getClasses(); ClassLoader getClassLoader(); void setClassLoader(ClassLoader classloader); ResolverUtil<T> findImplementations(Class<?> parent, String... packageNames); ResolverUtil<T> findAnnotated(Class<? extends Annotation> annotation, String... packageNames); ResolverUtil<T> find(Test test, String packageName);  }### Answer:
@Test void addIfMatching() { ResolverUtil<VFS> resolverUtil = new ResolverUtil<>(); resolverUtil.addIfMatching(new ResolverUtil.IsA(VFS.class), "org/apache/ibatis/io/DefaultVFS.class"); resolverUtil.addIfMatching(new ResolverUtil.IsA(VFS.class), "org/apache/ibatis/io/VFS.class"); Set<Class<? extends VFS>> classSets = resolverUtil.getClasses(); assertEquals(classSets.size(), 2); classSets.forEach(c -> assertTrue(VFS.class.isAssignableFrom(c))); }