public void testNonEmpty_write_partial_fromPastEnd_singleBuffer() throws IOException {
      fillContent("222222");
      assertEquals(3, file.write(8, buffer("111")));
      assertContentEquals("22222200111", file);
    }
Actual test cases for testing RegularFiles.
jimfs/src/test/java/com/google/common/jimfs/RegularFileTest.java