Filesystem { public Completable writeFileSync(String content, String filePath, boolean append) { return writeFileSync(content, StandardCharsets.UTF_8, filePath, append); }  Flowable<String> readTextFile(String pathToFile); Flowable<String> readTextFileFromClasspath(String resourcePath); Single<String> readTextFileFully(String pathToFile); Single<String> readTextFileFullyFromClasspath(String resourcePath); Completable writeFile(final String content, String filePath); Completable writeFileSync(String content, String filePath, boolean append); Completable writeFileSync(String content, Charset encoding, String filePath, boolean append);  }
@Test void testWriteFileSyncWithUnknownPathCreatesFile() throws Throwable { filesystem.writeFileSync("content", "src/test/resources/isntThere.txt", true).subscribe(); assertTrue(new File("src/test/resources/isntThere.txt").exists()); }