@Before
  public void setUp() throws IOException {
    server = new ServerSocket(0);
    serverThread = new Thread(this::serve);
    serverThread.setDaemon(true);
    serverThread.setName("Error-Server-Thread");
    serverThread.start();
    conf.setBoolean(X509Util.HBASE_CLIENT_NETTY_TLS_ENABLED, true);
    client = new NettyRpcClient(conf);

    mockAppender = mock(org.apache.logging.log4j.core.Appender.class);
    when(mockAppender.getName()).thenReturn("mockAppender");
    when(mockAppender.isStarted()).thenReturn(true);
    ((org.apache.logging.log4j.core.Logger) org.apache.logging.log4j.LogManager
      .getLogger(BufferCallBeforeInitHandler.class)).addAppender(mockAppender);
  }
A simple UT to make sure that we do not leak the SslExceptions to netty's TailContext, where it
will generate a confusing WARN message.
<p>
See HBASE-27782 for more details.
hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/TestTLSHandshadeFailure.java