@SuppressWarnings("rawtypes")
  private Pair<Object, CredentialsType> getCredentialsAndType() {
    for (var type : CredentialsManager.getInstance().getAllTypes()) {
      var credentials = getCredentials(type);
      if (credentials != null) {
        return new Pair<>(credentials, type);
      }
    }
    var credentials = CredentialsType.UNKNOWN.getCredentials(myCredentialsTypeHolder);
    if (credentials != null) return new Pair<>(credentials, CredentialsType.UNKNOWN);
    throw new IllegalStateException("Unknown connection type");
  }
@SuppressWarnings("rawtypes")
  private Pair<Object, CredentialsType> getCredentialsAndType()