### Question:
OFFrameDecoder extends ByteToMessageDecoder { @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { if (cause instanceof io.netty.handler.ssl.NotSslRecordException) { LOG.warn("Not an TLS record exception - please verify TLS configuration."); } else { LOG.warn("Unexpected exception from downstream.", cause); } LOG.warn("Closing connection."); ctx.close(); } OFFrameDecoder(ConnectionFacade connectionFacade, boolean tlsPresent); @Override void exceptionCaught(ChannelHandlerContext ctx, Throwable cause); static final byte LENGTH_OF_HEADER; }### Answer:
@Test public void testExceptionCaught() throws Exception { decoder.exceptionCaught(channelHandlerContext, new Throwable()); }