@RestrictedApi(explanation = "Should only be called in tests", link = "",
      allowedOnPath = ".*/src/test/.*")
  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "MS_EXPOSE_REP",
      justification = "test only")
  public static Set<Class<? extends Throwable>> getConnectionExceptionTypes() {
    return CONNECTION_EXCEPTION_TYPES;
  }
For test only. Usually you should use the {@link #isConnectionException(Throwable)} method
below.
hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ClientExceptionsUtil.java