@Test
public void testClose() throws IOException {

    OwnInputStream in = fillStream('c', 10);
    int id = streamProvider.registerStream(in);
    InputStreamProxy fixture = new InputStreamProxy(id, "");
    fixture.setStreamProvider(streamProvider);
    assertEquals('c', fixture.read());
    fixture.close();
    assertTrue(in.isClosed);
    try{
        streamProvider.read(id);
        fail("must have been closed already");
    } catch(IOException e) {}
}