public void testNonEmpty_read_partial_fromEnd_byteArray() throws IOException {
      fillContent("2222222222");
      byte[] array = new byte[3];
      assertEquals(2, file.read(8, array, 0, array.length));
      assertArrayEquals(bytes("220"), array);
      array = new byte[10];
      assertEquals(2, file.read(8, array, 1, 3));
      assertArrayEquals(bytes("0220000000"), array);
    }
Actual test cases for testing RegularFiles.
jimfs/src/test/java/com/google/common/jimfs/RegularFileTest.java