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