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