### Question:
DMNPathsHelperImpl implements DMNPathsHelper { DirectoryStream.Filter<org.uberfire.java.nio.file.Path> allModelsFilter() { return path -> importTypesHelper.isDMN(convertPath(path)) || importTypesHelper.isPMML(convertPath(path)); } DMNPathsHelperImpl(); @Inject  DMNPathsHelperImpl(final RefactoringQueryService refactoringQueryService,
                              final DMNImportTypesHelper importTypesHelper,
                              final @Named("ioStrategy") IOService ioService); @Override List<Path> getModelsPaths(final WorkspaceProject workspaceProject); @Override List<Path> getDMNModelsPaths(final WorkspaceProject workspaceProject); @Override List<Path> getPMMLModelsPaths(final WorkspaceProject workspaceProject); @Override String getRelativeURI(final Path dmnModelPath,
                                 final Path includedModelPath);  }### Answer:
@Test public void testAllModelsFilter() { final DirectoryStream.Filter<org.uberfire.java.nio.file.Path> filter = pathsHelper.allModelsFilter(); final org.uberfire.java.nio.file.Path nioPath1 = mock(org.uberfire.java.nio.file.Path.class); final org.uberfire.java.nio.file.Path nioPath2 = mock(org.uberfire.java.nio.file.Path.class); final org.uberfire.java.nio.file.Path nioPath3 = mock(org.uberfire.java.nio.file.Path.class); final Path path1 = mock(Path.class); final Path path2 = mock(Path.class); final Path path3 = mock(Path.class); when(path1.getFileName()).thenReturn("/Users/karreiro/projects/dmn-project/model.dmn"); when(path2.getFileName()).thenReturn("/Users/karreiro/projects/dmn-project/document.pmml"); when(path3.getFileName()).thenReturn("/Users/karreiro/projects/dmn-project/Readme.md"); doReturn(path1).when(pathsHelper).convertPath(nioPath1); doReturn(path2).when(pathsHelper).convertPath(nioPath2); doReturn(path3).when(pathsHelper).convertPath(nioPath3); assertTrue(filter.accept(nioPath1)); assertTrue(filter.accept(nioPath2)); assertFalse(filter.accept(nioPath3)); }