public void testNonEmpty_read_all_byteArray_largerThanContent() throws IOException {
      fillContent("222222");
      byte[] array = new byte[10];
      assertEquals(6, file.read(0, array, 0, array.length));
      assertArrayEquals(bytes("2222220000"), array);
      array = new byte[10];
      assertEquals(6, file.read(0, array, 2, 6));
      assertArrayEquals(bytes("0022222200"), array);
    }
Actual test cases for testing RegularFiles.
jimfs/src/test/java/com/google/common/jimfs/RegularFileTest.java