### Question:
PetApi { public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException { Object localVarPostBody = null; if (petId == null) { throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFile"); } String localVarPath = "/pet/{petId}/uploadImage" .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (file != null) localVarFormParams.put("file", file); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "multipart/form-data" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "petstore_auth" }; GenericType<ModelApiResponse> localVarReturnType = new GenericType<ModelApiResponse>() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } PetApi();  PetApi(ApiClient apiClient); ApiClient getApiClient(); void setApiClient(ApiClient apiClient); void addPet(Pet body); void deletePet(Long petId, String apiKey); List<Pet> findPetsByStatus(List<String> status); @Deprecated Set<Pet> findPetsByTags(Set<String> tags); Pet getPetById(Long petId); void updatePet(Pet body); void updatePetWithForm(Long petId, String name, String status); ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file); ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata);  }### Answer:
@Test public void uploadFileTest() throws ApiException { Long petId = null; String additionalMetadata = null; File file = null; ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); }