### Question:
UiExtensionsScanner { public UiExtensions scan(String... locations) throws IOException { List<UiExtension> extensions = new ArrayList<>(); for (String location : locations) { for (Resource resource : resolveAssets(location)) { String resourcePath = this.getResourcePath(location, resource); if (resourcePath != null && resource.isReadable()) { UiExtension extension = new UiExtension(resourcePath, location + resourcePath); log.debug("Found UiExtension {}", extension); extensions.add(extension); } } } return new UiExtensions(extensions); } UiExtensionsScanner(ResourcePatternResolver resolver); UiExtensions scan(String... locations);  }### Answer:
@Test public void should_not_find_extensions() throws IOException { UiExtensions extensions = this.scanner.scan("classpath:/META-INF/NO-test-extensions/"); assertThat(extensions.getCssExtensions()).isEmpty(); assertThat(extensions.getJsExtensions()).isEmpty(); }
@Test public void should_find_extensions() throws IOException { UiExtensions extensions = this.scanner.scan("classpath:/META-INF/test-extensions/"); assertThat(extensions.getCssExtensions()).contains(new UiExtension("custom/custom.abcdef.css", "classpath:/META-INF/test-extensions/custom/custom.abcdef.css")); assertThat(extensions.getJsExtensions()).contains(new UiExtension("custom/custom.abcdef.js", "classpath:/META-INF/test-extensions/custom/custom.abcdef.js")); }