@Test
public void close() throws IOException {

    NPipeSocketImpl impl = new NPipeSocketImpl();
    connect(impl);
    PipeChannelInputStream inputStream = (PipeChannelInputStream) impl.getInputStream();
    PipeChannelOutputStream outputStream = (PipeChannelOutputStream) impl.getOutputStream();
    assertThat(inputStream.isOpen()).isTrue();
    assertThat(outputStream.isOpen()).isTrue();
    impl.close();
    assertThat(inputStream.isOpen()).isFalse();
    assertThat(outputStream.isOpen()).isFalse();
    impl.close();
}