### Question:
ApiClient extends JavaTimeFormatter { public Map<String, Authentication> getAuthentications() { return authentications; } ApiClient();  ApiClient(Map<String, Authentication> authMap); JSON getJSON(); Client getHttpClient(); ApiClient setHttpClient(Client httpClient); String getBasePath(); ApiClient setBasePath(String basePath); List<ServerConfiguration> getServers(); ApiClient setServers(List<ServerConfiguration> servers); Integer getServerIndex(); ApiClient setServerIndex(Integer serverIndex); Map<String, String> getServerVariables(); ApiClient setServerVariables(Map<String, String> serverVariables); Map<String, Authentication> getAuthentications(); Authentication getAuthentication(String authName); ApiClient setUsername(String username); ApiClient setPassword(String password); ApiClient setApiKey(String apiKey); ApiClient configureApiKeys(HashMap<String, String> secrets); ApiClient setApiKeyPrefix(String apiKeyPrefix); ApiClient setBearerToken(String bearerToken); ApiClient setAccessToken(String accessToken); ApiClient setOauthCredentials(String clientId, String clientSecret); ApiClient setOauthPasswordFlow(String username, String password); ApiClient setOauthAuthorizationCodeFlow(String code); ApiClient setOauthScope(String scope); ApiClient setUserAgent(String userAgent); String getUserAgent(); ApiClient addDefaultHeader(String key, String value); ApiClient addDefaultCookie(String key, String value); boolean isDebugging(); ApiClient setDebugging(boolean debugging); String getTempFolderPath(); ApiClient setTempFolderPath(String tempFolderPath); int getConnectTimeout(); ApiClient setConnectTimeout(int connectionTimeout); int getReadTimeout(); ApiClient setReadTimeout(int readTimeout); DateFormat getDateFormat(); ApiClient setDateFormat(DateFormat dateFormat); Date parseDate(String str); String formatDate(Date date); String parameterToString(Object param); List<Pair> parameterToPairs(String collectionFormat, String name, Object value); boolean isJsonMime(String mime); String selectHeaderAccept(String[] accepts); String selectHeaderContentType(String[] contentTypes); String escapeString(String str); Entity<?> serialize(Object obj, Map<String, Object> formParams, String contentType, boolean isBodyNullable); String serializeToString(Object obj, Map<String, Object> formParams, String contentType, boolean isBodyNullable); @SuppressWarnings("unchecked") T deserialize(Response response, GenericType<T> returnType); File downloadFileFromResponse(Response response); File prepareDownloadFile(Response response); ApiResponse<T> invokeAPI(
      String operation,
      String path,
      String method,
      List<Pair> queryParams,
      Object body,
      Map<String, String> headerParams,
      Map<String, String> cookieParams,
      Map<String, Object> formParams,
      String accept,
      String contentType,
      String[] authNames,
      GenericType<T> returnType,
      boolean isBodyNullable); @Deprecated ApiResponse<T> invokeAPI(String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String accept, String contentType, String[] authNames, GenericType<T> returnType, boolean isBodyNullable);  }### Answer:
@Test public void testGetAuthentications() { Map<String, Authentication> auths = apiClient.getAuthentications(); Authentication auth = auths.get("api_key"); assertNotNull(auth); assertTrue(auth instanceof ApiKeyAuth); ApiKeyAuth apiKeyAuth = (ApiKeyAuth) auth; assertEquals("header", apiKeyAuth.getLocation()); assertEquals("api_key", apiKeyAuth.getParamName()); auth = auths.get("petstore_auth"); assertTrue(auth instanceof OAuth); assertSame(auth, apiClient.getAuthentication("petstore_auth")); assertNull(auths.get("unknown")); try { auths.put("my_auth", new HttpBasicAuth()); fail("the authentications returned should not be modifiable"); } catch (UnsupportedOperationException e) { } }