public void testEmpty_transferFrom_fromStart_countEqualsSrcSize() throws IOException {
      long transferred = file.transferFrom(new ByteBufferChannel(buffer("111111")), 0, 6);
      assertEquals(6, transferred);
      assertContentEquals("111111", file);
    }
Actual test cases for testing RegularFiles.
jimfs/src/test/java/com/google/common/jimfs/RegularFileTest.java