// Path: src/main/java/com/github/davidmoten/rx2/Strings.java
// public static FlowableTransformer<byte[], String> decode(CharsetDecoder decoder) {
//     return decode(decoder, BackpressureStrategy.BUFFER, DEFAULT_REQUEST_SIZE);
// }


import static com.github.davidmoten.rx2.Strings.decode;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import org.junit.Test;
import com.github.davidmoten.guavamini.Lists;
import com.github.davidmoten.junit.Asserts;
import io.reactivex.Flowable;
import io.reactivex.functions.BiFunction;
package com.github.davidmoten.rx2;






public class StringsTest {

    @Test
    public void testMultibyteSpanningTwoBuffers() {
        Flowable<byte[]> src = Flowable.just(new byte[] { (byte) 0xc2 }, new byte[] { (byte) 0xa1 });
// Path: src/main/java/com/github/davidmoten/rx2/Strings.java
// public static FlowableTransformer<byte[], String> decode(CharsetDecoder decoder) {
//     return decode(decoder, BackpressureStrategy.BUFFER, DEFAULT_REQUEST_SIZE);
// }


// Path: src/test/java/com/github/davidmoten/rx2/StringsTest.java
import static com.github.davidmoten.rx2.Strings.decode;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import org.junit.Test;
import com.github.davidmoten.guavamini.Lists;
import com.github.davidmoten.junit.Asserts;
import io.reactivex.Flowable;
import io.reactivex.functions.BiFunction;

package com.github.davidmoten.rx2;






public class StringsTest {

    @Test
    public void testMultibyteSpanningTwoBuffers() {
        Flowable<byte[]> src = Flowable.just(new byte[] { (byte) 0xc2 }, new byte[] { (byte) 0xa1 });
        String out = decode(src, "UTF-8").blockingSingle();