@Test
public void testRead_withIOException_shouldThrowException() throws Exception {

    thrown.expect(IOException.class);
    final InputStream mockedDelegateInputStream = mock(InputStream.class);
    when(mockedDelegateInputStream.read()).thenThrow(new IOException("Exception"));
    final WrappedResponseInputStream streamUnderTest =
            new WrappedResponseInputStream(mockedDelegateInputStream, mockRawResponseDelegate);
    streamUnderTest.read();
}