public ApiClient createApiClient(@NonNull String baseUrl, String token, String truststoreLocation)
      throws MalformedURLException, SSLException {
    WebClient webClient = createWebClient(baseUrl, token, truststoreLocation);
    ApiClient apiClient = new ApiClient(webClient);
    if (token != null && !token.isEmpty()) {
      apiClient.addDefaultHeader(HttpHeaders.AUTHORIZATION, String.format("Bearer %s", token));
    }
    apiClient.setBasePath(baseUrl);
    return apiClient;
  }
@Test
  public void testSetClientNameCalled() throws Exception {
    ArgumentCaptor<String> clientNameCapture = ArgumentCaptor.forClass(String.class);

    tablesApiClientFactorySpy.setClientName("trino");
    tablesApiClientFactorySpy.createApiClient(
        "https://test.openhouse.com", "", tmpCert.getAbsolutePath());
    Mockito.verify(tablesApiClientFactorySpy, Mockito.times(1))
        .setClientName(clientNameCapture.capture());
    assertEquals("trino", clientNameCapture.getValue());
  }