public void testNonEmpty_read_fromPastEnd_singleBuffer() throws IOException {
      fillContent("123");
      ByteBuffer buffer = ByteBuffer.allocate(3);
      assertEquals(-1, file.read(3, buffer));
      assertBufferEquals("000", 3, buffer);
    }
Actual test cases for testing RegularFiles.
jimfs/src/test/java/com/google/common/jimfs/RegularFileTest.java