public void testNonEmpty_write_overwrite_greaterLength() throws IOException {
      fillContent("2222");
      assertEquals(8, file.write(0, buffer("12345678")));
      assertContentEquals("12345678", file);
    }
Actual test cases for testing RegularFiles.
jimfs/src/test/java/com/google/common/jimfs/RegularFileTest.java