package throwing.stream;

import static java.util.stream.Collectors.toList;
import static org.hamcrest.Matchers.contains;
import static org.junit.Assert.assertThat;

import java.util.List;
import java.util.stream.Stream;

import org.junit.Test;

import throwing.bridge.ThrowingBridge;

public class ReadmeTest {
    @SuppressWarnings("unchecked")
    @Test
    public void readme() throws ClassNotFoundException {
        Stream<String> names = Stream.of("java.lang.Object", "java.util.stream.Stream");
        ThrowingStream<String, ClassNotFoundException> s = ThrowingBridge.of(names, ClassNotFoundException.class);
        List<Class<?>> l = s.map(ClassLoader.getSystemClassLoader()::loadClass).collect(toList());
        assertThat(l, contains(Object.class, Stream.class));
    }
}

@@ -243,48 +243,8 @@
 t;%0A%0A
-import throwing.bridge.ThrowingBridge;%0A%0A
 publ
@@ -527,14 +527,14 @@
 wing
-Bridge
+Stream
 .of(

Update readme test