public void testNonEmpty_transferFrom_toMiddle_transferGoesBeyondContentSize()
        throws IOException {
      fillContent("222222");
      ByteBufferChannel channel = new ByteBufferChannel(buffer("111111"));
      assertEquals(6, file.transferFrom(channel, 4, 6));
      assertContentEquals("2222111111", file);
    }
Actual test cases for testing RegularFiles.
jimfs/src/test/java/com/google/common/jimfs/RegularFileTest.java