### Question:
ExtendedFileValueProvider extends ValueProviderSupport { @Override public List<CompletionProposal> complete(MethodParameter parameter, CompletionContext completionContext, String[] hints) { String input = completionContext.currentWordUpToCursor(); int lastSlash = input.lastIndexOf("/"); File currentDir = lastSlash > -1 ? new File(input.substring(0, lastSlash + 1)) : new File("./"); String prefix = input.substring(lastSlash + 1); File[] files = currentDir.listFiles((dir, name) -> name.startsWith(prefix)); if (files == null || files.length == 0) { return Collections.emptyList(); } return Arrays.stream(files) .map(f -> new ExtendedCompletionProposal(path(f), f.isFile())) .collect(Collectors.toList()); } ExtendedFileValueProvider(boolean replaceAll); @Override boolean supports(MethodParameter parameter, CompletionContext completionContext); @Override List<CompletionProposal> complete(MethodParameter parameter, CompletionContext completionContext,
                                             String[] hints);  }### Answer:
@Test void complete() { ExtendedFileValueProvider provider = new ExtendedFileValueProvider(true); List<CompletionProposal> result = provider.complete(null, new CompletionContext(Arrays.asList("--file", "src"), 1, 3), null); assertNotEquals(0, result.size()); result = provider.complete(null, new CompletionContext(Arrays.asList("--file", "xxx"), 1, 3), null); assertEquals(0, result.size()); }