public void testNonEmpty_truncate_toZero() throws IOException {
      fillContent("123456");
      file.truncate(0);
      assertContentEquals("", file);
    }
Actual test cases for testing RegularFiles.
jimfs/src/test/java/com/google/common/jimfs/RegularFileTest.java