### Question:
App { public static List<URL> getResources(String name) throws IOException { final ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); return Collections.list(classLoader.getResources(name)); }  static void main(String[] args); static List<URL> getResources(String name);  }### Answer:
@Test public void shouldSolveDirectoryResource() throws IOException { final List<URL> resources = getResources("folder/subfolder"); assertFalse(resources.isEmpty()); assertTrue(resources.get(0).toString().contains("subfolder")); }
@Test public void shouldSolveFileResource() throws IOException { final List<URL> resources = getResources("folder/subfolder/resource-001.txt"); assertFalse(resources.isEmpty()); assertTrue(resources.get(0).toString().contains("resource-001.txt")); }