### Question:
KQueueSocketChannelConfig extends KQueueChannelConfig implements SocketChannelConfig { @Override public int getSoLinger() { try { return ((KQueueSocketChannel) channel).socket.getSoLinger(); } catch (IOException e) { throw new ChannelException(e); } } KQueueSocketChannelConfig(KQueueSocketChannel channel); @Override Map<ChannelOption<?>, Object> getOptions(); @SuppressWarnings("unchecked") @Override T getOption(ChannelOption<T> option); @Override boolean setOption(ChannelOption<T> option, T value); @Override int getReceiveBufferSize(); @Override int getSendBufferSize(); @Override int getSoLinger(); @Override int getTrafficClass(); @Override boolean isKeepAlive(); @Override boolean isReuseAddress(); @Override boolean isTcpNoDelay(); int getSndLowAt(); void setSndLowAt(int sndLowAt); boolean isTcpNoPush(); void setTcpNoPush(boolean tcpNoPush); @Override KQueueSocketChannelConfig setKeepAlive(boolean keepAlive); @Override KQueueSocketChannelConfig setReceiveBufferSize(int receiveBufferSize); @Override KQueueSocketChannelConfig setReuseAddress(boolean reuseAddress); @Override KQueueSocketChannelConfig setSendBufferSize(int sendBufferSize); @Override KQueueSocketChannelConfig setSoLinger(int soLinger); @Override KQueueSocketChannelConfig setTcpNoDelay(boolean tcpNoDelay); @Override KQueueSocketChannelConfig setTrafficClass(int trafficClass); @Override boolean isAllowHalfClosure(); @Override KQueueSocketChannelConfig setRcvAllocTransportProvidesGuess(boolean transportProvidesGuess); @Override KQueueSocketChannelConfig setPerformancePreferences(
            int connectionTime, int latency, int bandwidth); @Override KQueueSocketChannelConfig setAllowHalfClosure(boolean allowHalfClosure); @Override KQueueSocketChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis); @Override @Deprecated KQueueSocketChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead); @Override KQueueSocketChannelConfig setWriteSpinCount(int writeSpinCount); @Override KQueueSocketChannelConfig setAllocator(ByteBufAllocator allocator); @Override KQueueSocketChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator); @Override KQueueSocketChannelConfig setAutoRead(boolean autoRead); @Override KQueueSocketChannelConfig setAutoClose(boolean autoClose); @Override @Deprecated KQueueSocketChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark); @Override @Deprecated KQueueSocketChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark); @Override KQueueSocketChannelConfig setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark); @Override KQueueSocketChannelConfig setMessageSizeEstimator(MessageSizeEstimator estimator);  }### Answer:
@Test public void testGetOptionWhenClosed() { ch.close().syncUninterruptibly(); try { ch.config().getSoLinger(); fail(); } catch (ChannelException e) { assertTrue(e.getCause() instanceof ClosedChannelException); } }