FilesystemFacadeImpl implements IFilesystemFacade { @Override public String readToString(final IPath path) throws IOException { return new String(Files.readAllBytes(Paths.get(path.getPath()))); }  @Override Collection<IPath> listSubdirectories(final IPath directory); @Override Collection<IPath> listFiles(final IPath directory, final IPathFilter filter); @Override IPath joinPaths(final IPath first, final IPath... rest); @Override String readToString(final IPath path);  }
@Test public void Should_readToString_readAFileToString() throws Exception { java.nio.file.Path tfp = Files.createTempFile("file-with-string-", ""); Files.write(tfp, "The quick brown actor".getBytes()); String read = filesystemFacade.readToString(new Path(tfp)); assertEquals("The quick brown actor", read); }