### Question:
ApiClient { public boolean isJsonMime(String mime) { String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; return mime != null && (mime.matches(jsonMime) || mime.equals("*/*")); } ApiClient(); static DateFormat buildDefaultDateFormat(); ApiClient rebuildHttpClient(); ObjectMapper getObjectMapper(); ApiClient setObjectMapper(ObjectMapper objectMapper); 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); int getStatusCode(); Map<String, List<String>> getResponseHeaders(); Map<String, Authentication> getAuthentications(); Authentication getAuthentication(String authName); void setUsername(String username); void setPassword(String password); void setApiKey(String apiKey); void setApiKeyPrefix(String apiKeyPrefix); void setAccessToken(String accessToken); ApiClient setUserAgent(String userAgent); ApiClient addDefaultHeader(String key, String value); ApiClient addDefaultCookie(String key, String value); boolean isDebugging(); ApiClient setDebugging(boolean debugging); int getConnectTimeout(); ApiClient setConnectTimeout(int connectionTimeout); DateFormat getDateFormat(); ApiClient setDateFormat(DateFormat dateFormat); Date parseDate(String str); String formatDate(Date date); String parameterToString(Object param); List<Pair> parameterToPair(String name, Object value); List<Pair> parameterToPairs(String collectionFormat, String name, Collection value); boolean isJsonMime(String mime); String selectHeaderAccept(String[] accepts); String selectHeaderContentType(String[] contentTypes); String escapeString(String str); Object serialize(Object obj, String contentType, Map<String, Object> formParams); T invokeAPI(String path, String method, List<Pair> queryParams, List<Pair> collectionQueryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String accept, String contentType, String[] authNames, GenericType<T> returnType);  }### Answer:
@Test public void testIsJsonMime() { assertFalse(apiClient.isJsonMime(null)); assertFalse(apiClient.isJsonMime("")); assertFalse(apiClient.isJsonMime("text/plain")); assertFalse(apiClient.isJsonMime("application/xml")); assertFalse(apiClient.isJsonMime("application/jsonp")); assertFalse(apiClient.isJsonMime("example/json")); assertFalse(apiClient.isJsonMime("example/foo+bar+jsonx")); assertFalse(apiClient.isJsonMime("example/foo+bar+xjson")); assertTrue(apiClient.isJsonMime("application/json")); assertTrue(apiClient.isJsonMime("application/json; charset=UTF8")); assertTrue(apiClient.isJsonMime("APPLICATION/JSON")); assertTrue(apiClient.isJsonMime("application/problem+json")); assertTrue(apiClient.isJsonMime("APPLICATION/PROBLEM+JSON")); assertTrue(apiClient.isJsonMime("application/json\t")); assertTrue(apiClient.isJsonMime("example/foo+bar+json")); assertTrue(apiClient.isJsonMime("example/foo+json;x;y")); assertTrue(apiClient.isJsonMime("example/foo+json\t;")); assertTrue(apiClient.isJsonMime("Example/fOO+JSON")); }