@Test
public void readByte_throwsIOException() throws Exception {

    final IOException exception = new IOException("test");
    when(wrappedStream.read()).thenThrow(exception);
    try {
        //noinspection ResultOfMethodCallIgnored
        stream.read();
        fail("should've thrown!");
    } catch (IOException e) {
        assertEquals("test", e.getMessage());
    }
    //noinspection ResultOfMethodCallIgnored
    verify(wrappedStream, times(1)).read();
    verify(listener, times(1)).hitException(eq(exception), eq(0L));
}