@Test
public void readShouldReadReaderCorrectlyAndShouldCloseStream() throws Exception {

    // Read content shorter than buffer size ...
    String content = "This is the way to grandma's house.";
    Reader reader = new StringReader(content);
    ReaderWrapper wrapper = new ReaderWrapper(reader);
    assertThat(wrapper.isClosed(), is(false));
    assertThat(StringUtil.read(wrapper), is(content));
    assertThat(wrapper.isClosed(), is(true));
    // Read content longer than buffer size ...
    for (int i = 0; i != 10; ++i) {
        content += content; // note this doubles each time!
    }
    reader = new StringReader(content);
    wrapper = new ReaderWrapper(reader);
    assertThat(wrapper.isClosed(), is(false));
    assertThat(StringUtil.read(wrapper), is(content));
    assertThat(wrapper.isClosed(), is(true));
}