RequestQueue<ReadRequest> getReadRequestQueue(FileIOChannel.ID channelID) {
        return this.readers[channelID.getThreadNum()].requestQueue;
    }
@Test
    void testExceptionPropagationReader() throws Exception {
        // use atomic boolean as a boolean reference
        final AtomicBoolean handlerCalled = new AtomicBoolean();
        final AtomicBoolean exceptionForwarded = new AtomicBoolean();

        ReadRequest req =
                new ReadRequest() {

                    @Override
                    public void requestDone(IOException ioex) {
                        if (ioex instanceof TestIOException) {
                            exceptionForwarded.set(true);
                        }

                        synchronized (handlerCalled) {
                            handlerCalled.set(true);
                            handlerCalled.notifyAll();
                        }
                    }

                    @Override
                    public void read() throws IOException {
                        throw new TestIOException();
                    }
                };

        // test the read queue
        RequestQueue<ReadRequest> rq = ioManager.getReadRequestQueue(ioManager.createChannel());
        rq.add(req);

        // wait until the asynchronous request has been handled
        synchronized (handlerCalled) {
            while (!handlerCalled.get()) {
                handlerCalled.wait();
            }
        }

        assertThat(exceptionForwarded).isTrue();
    }