### Question:
AvailableBufferedInputStream extends InputStream { public int read() throws IOException { if (m_read >= m_end) { fill(); if (m_read >= m_end) return(m_input.read()); } return(m_buffer[m_read++] & 0x00FF); } AvailableBufferedInputStream(InputStream input);  AvailableBufferedInputStream(InputStream input, int bufferSize); int getBufferSize(); int read(); int read(byte buffer[], int offset, int length); int peek(); int available(); void unread(int data); String toString();  }### Answer:
@Test public void readBufferEmptyBuffer() throws IOException { byte buffer[]; m_output.write(10); m_output.flush(); buffer = new byte[1]; assertEquals(1, m_input.read(buffer)); assertEquals(10, buffer[0]); }