@Test
public void testPropogateErrorInTheMiddleOfMultibyte() {

    Observable<byte[]> src = Observable.from(new byte[] { (byte) 0xc2 });
    Observable<byte[]> err = Observable.error(new IOException());
    CharsetDecoder charsetDecoder = Charset.forName("UTF-8").newDecoder();
    try {
        StringObservable.decode(Observable.concat(src, err), charsetDecoder).toList().toBlockingObservable().single();
        fail();
    } catch (RuntimeException e) {
        assertEquals(MalformedInputException.class, e.getCause().getClass());
    }
}