### Question:
CanExecuteFileFilter implements FileFilter, Serializable { @Override public boolean accept(final FileSelectInfo fileInfo) throws FileSystemException { return fileInfo.getFile().isExecutable(); } protected  CanExecuteFileFilter(); @Override boolean accept(final FileSelectInfo fileInfo); static final FileFilter CAN_EXECUTE; static final FileFilter CANNOT_EXECUTE; }### Answer:
@Test public void testAcceptCanExecute() throws FileSystemException { Assert.assertTrue(CanExecuteFileFilter.CAN_EXECUTE.accept(executableFileInfo)); Assert.assertTrue(CanExecuteFileFilter.CAN_EXECUTE.accept(notExecutableFileInfo)); Assert.assertFalse(CanExecuteFileFilter.CAN_EXECUTE.accept(notExistingFileInfo)); }
@Test public void testAcceptCannotExecute() throws FileSystemException { Assert.assertFalse(CanExecuteFileFilter.CANNOT_EXECUTE.accept(executableFileInfo)); Assert.assertFalse(CanExecuteFileFilter.CANNOT_EXECUTE.accept(notExecutableFileInfo)); Assert.assertTrue(CanExecuteFileFilter.CANNOT_EXECUTE.accept(notExistingFileInfo)); }