class PublishQueueChannel implements ChronicleChannel {
    private final ChronicleChannelCfg channelCfg;
    private final AbstractHandler publishHandler;
    private final ChannelHeader headerOut;
    private final ChronicleQueue publishQueue;
    private final ExcerptTailer tailer;

    public PublishQueueChannel(ChronicleChannelCfg channelCfg, AbstractHandler publishHandler, ChronicleQueue publishQueue) {
        this.channelCfg = channelCfg;
        this.publishHandler = publishHandler;
        this.headerOut = publishHandler.responseHeader(null);
        this.publishQueue = publishQueue;
        tailer = publishQueue.createTailer();
    }

    @Override
    public ChronicleChannelCfg channelCfg() {
        return channelCfg;
    }

    @Override
    public ChannelHeader headerOut() {
        return headerOut;
    }

    @Override
    public ChannelHeader headerIn() {
        return publishHandler;
    }

    @Override
    public void close() {
        Closeable.closeQuietly(
                tailer,
                publishQueue);
    }

    @Override
    public boolean isClosed() {
        return publishQueue.isClosed();
    }

    @Override
    public DocumentContext readingDocument() {
        return NoDocumentContext.INSTANCE;
    }

    @Override
    public DocumentContext writingDocument(boolean metaData) throws UnrecoverableTimeoutException {
        return acquireThreadLocalAppender(publishQueue).writingDocument(metaData);
    }

    @Override
    public DocumentContext acquireWritingDocument(boolean metaData) throws UnrecoverableTimeoutException {
        return acquireThreadLocalAppender(publishQueue).acquireWritingDocument(metaData);
    }

    @Override
    public void testMessage(long now) {<FILL_FUNCTION_BODY>}

    @Override
    public long lastTestMessage() {
        throw new UnsupportedOperationException();
    }
}

        try (DocumentContext dc = writingDocument(true)) {
            dc.wire().write("testMessage").writeLong(NanoTime.INSTANCE, now);
        }
    
<no_super_class>