public void testNonEmpty_write_partial_fromEnd_byteArray() throws IOException {
      fillContent("222222");
      assertEquals(3, file.write(6, bytes("111"), 0, 3));
      assertContentEquals("222222111", file);
      assertEquals(2, file.write(9, bytes("333333"), 3, 2));
      assertContentEquals("22222211133", file);
    }
Actual test cases for testing RegularFiles.
jimfs/src/test/java/com/google/common/jimfs/RegularFileTest.java