public void testNonEmpty_write_partial_fromPastEnd_byteArray() throws IOException {
      fillContent("222222");
      assertEquals(3, file.write(8, bytes("111"), 0, 3));
      assertContentEquals("22222200111", file);
      assertEquals(2, file.write(13, bytes("333333"), 4, 2));
      assertContentEquals("222222001110033", file);
    }
Actual test cases for testing RegularFiles.
jimfs/src/test/java/com/google/common/jimfs/RegularFileTest.java