### Question:
BufferedReader extends Reader { @Override public int read() { verifyNotClosed(); if (pos < end || fillBuf() != -1) return buf[pos++]; return -1; } BufferedReader(Reader reader);  BufferedReader(Reader reader, int size); @Override void close(); void mark(int markLimit); @Override int read(); @Override int read(char[] buffer, int offset, int length); String readLine(); void reset(); long skip(long amount);  }### Answer:
@Test public void testReadEnd() { BufferedReader br = getBufferedReader(); while (-1 != br.read()) { } br.read(); assertEquals(-1, br.read()); }
@Test public void testReadCharOutOfBounds() { BufferedReader br = getBufferedReader(); char[] chars = new char[3]; while (-1 != br.read()) { } int ret = br.read(chars); assertEquals(-1, ret); assertEquals(0, chars[0]); assertEquals(0, chars[1]); assertEquals(0, chars[2]); }
@Test public void testReadCharArrayOffset() { BufferedReader br = getBufferedReader(); char[] chars = new char[3]; chars[0] = 'x'; br.read(chars, 1, 2); assertEquals('x', chars[0]); assertEquals('L', chars[1]); assertEquals('o', chars[2]); }