@Test
  public void testIsFatalConnectionException() {
    // intentionally not reference the class object directly, so here we will not load the class, to
    // make sure that in isFatalConnectionException, we can use initialized = false when calling
    // Class.forName
    ExceptionResponse resp = ExceptionResponse.newBuilder()
      .setExceptionClassName("org.apache.hadoop.hbase.ipc.DummyFatalConnectionException").build();
    assertTrue(IPCUtil.isFatalConnectionException(resp));

    resp = ExceptionResponse.newBuilder()
      .setExceptionClassName("org.apache.hadoop.hbase.ipc.DummyException").build();
    assertFalse(IPCUtil.isFatalConnectionException(resp));

    // class not found
    resp = ExceptionResponse.newBuilder()
      .setExceptionClassName("org.apache.hadoop.hbase.ipc.WhatEver").build();
    assertFalse(IPCUtil.isFatalConnectionException(resp));
  }
See HBASE-21862, it is important to keep original exception type for connection exceptions.
hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/TestIPCUtil.java