@Override
    public boolean registerAllRequestsProcessedListener(NotificationListener listener)
            throws IOException {
        return super.registerAllRequestsProcessedListener(listener);
    }
@Test
    void testSubscribe() throws Exception {
        final TestNotificationListener listener = new TestNotificationListener();

        // Unsuccessful subscription, because no outstanding requests
        assertThat(writer.registerAllRequestsProcessedListener(listener))
                .withFailMessage("Allowed to subscribe w/o any outstanding requests.")
                .isFalse();

        // Successful subscription
        addRequest();
        assertThat(writer.registerAllRequestsProcessedListener(listener))
                .withFailMessage("Didn't allow to subscribe.")
                .isTrue();

        // Test notification
        handleRequest();

        assertThat(listener.getNumberOfNotifications())
                .withFailMessage("Listener was not notified.")
                .isOne();
    }