### Question:
CanReadFileFilter implements FileFilter, Serializable { @Override public boolean accept(final FileSelectInfo fileInfo) throws FileSystemException { return fileInfo.getFile().isReadable(); } protected  CanReadFileFilter(); @Override boolean accept(final FileSelectInfo fileInfo); static final FileFilter CAN_READ; static final FileFilter CANNOT_READ; static final FileFilter READ_ONLY; }### Answer:
@Test public void testAcceptCanRead() throws FileSystemException { Assert.assertTrue(CanReadFileFilter.CAN_READ.accept(writeableFileInfo)); Assert.assertTrue(CanReadFileFilter.CAN_READ.accept(readOnlyFileInfo)); Assert.assertFalse(CanReadFileFilter.CAN_READ.accept(notExistingFileInfo)); }
@Test public void testAcceptCannotRead() throws FileSystemException { Assert.assertFalse(CanReadFileFilter.CANNOT_READ.accept(writeableFileInfo)); Assert.assertFalse(CanReadFileFilter.CANNOT_READ.accept(readOnlyFileInfo)); Assert.assertTrue(CanReadFileFilter.CANNOT_READ.accept(notExistingFileInfo)); }
@Test public void testAcceptReadOnly() throws FileSystemException { Assert.assertFalse(CanReadFileFilter.READ_ONLY.accept(writeableFileInfo)); Assert.assertTrue(CanReadFileFilter.READ_ONLY.accept(readOnlyFileInfo)); Assert.assertFalse(CanReadFileFilter.READ_ONLY.accept(notExistingFileInfo)); }