SystemFileSystem extends AbstractFileSystem { @Override public boolean isReadable(File f) { return exists(f) && f.canRead(); } @Inject  SystemFileSystem(); @Override File getTemporaryDirectory(String prefix); @Override File getTemporaryDirectory(String prefix, Lifetime lifetime); @Override void cleanUpTempDirs(); @Override void setLifetime(File path, Lifetime lifetime); @Override Set<File> findFiles(File path); @Override File[] listFiles(File path); @Override boolean exists(File f); @Override String getName(File f); @Override boolean isFile(File f); @Override boolean isDirectory(File f); @Override boolean isExecutable(File f); @Override boolean isReadable(File f); @Override void setExecutable(File f); @Override void setNonExecutable(File f); @Override void makeDirsForFile(File f); @Override void makeDirs(File f); @Override void copyFile(File src, File dest); @Override void write(String contents, File f); @Override void deleteRecursively(File file); @Override File getResourceAsFile(String resource); @Override String fileToString(File f);  }
@Test public void testReadable() throws Exception { File file = touchAndCreate(tempDir, "file"); file.setReadable(true); assertThat(fs.isReadable(file)).isTrue(); }