### Question:
PrefixReader extends Reader { @Override public void close() throws IOException { delegate.close(); } PrefixReader(char[] prefix, Reader delegate);  PrefixReader(Object lock, char[] prefix, Reader delegate); @Override int read(CharBuffer target); @Override int read(); @Override int read(char[] cbuf, int off, int len); @Override long skip(long n); @Override boolean ready(); @Override boolean markSupported(); @Override void mark(int readAheadLimit); @Override void reset(); @Override void close();  }### Answer:
@Test public void close() throws Exception { final Reader mockDelegate = Mockito.mock(Reader.class); final PrefixReader cut = new PrefixReader(prefix, mockDelegate); cut.close(); verify(mockDelegate).close(); }