public void testNonEmpty_read_all_singleBuffer_largerThanContent() throws IOException {
      fillContent("222222");
      ByteBuffer buffer = ByteBuffer.allocate(16);
      assertBufferEquals("0000000000000000", 16, buffer);
      assertEquals(6, file.read(0, buffer));
      assertBufferEquals("2222220000000000", 10, buffer);
    }
Actual test cases for testing RegularFiles.
jimfs/src/test/java/com/google/common/jimfs/RegularFileTest.java