### Question:
StringReader extends Reader { @Override public void close() { str = null; } StringReader(String str); @Override void close(); @Override int read(); @Override int read(char[] buf, int offset, int length);  }### Answer:
@Test public void testClose() { String initialData = "Test String"; StringReader sut = new StringReader(initialData); sut.close(); try { sut.read(); } catch (IOException e) { return; } fail("IO exception should be thrown"); }