Upload { public boolean uploadConditionChecker(String fileName, File file) { LOG.debug("Call condition checker upload API."); String url = buildUrl(CONDITION_CHECKER_UPLOAD_URL_POSTFIX, ImmutableMap.of(FILE_NAME, fileName)); return callFileUploadMethod(url, file); } Upload(WilmaServiceConfig config);  Upload(WilmaServiceConfig config, WilmaHttpClient client); boolean uploadConditionChecker(String fileName, File file); boolean uploadTemplate(String fileName, File file); boolean uploadTemplateFormatter(String fileName, File file); boolean uploadStubConfiguration(String fileName, File file); boolean uploadStubConfiguration(WilmaStub resource);  }
@Test public void shouldCallTheProperConditionCheckerUploadUrlWithTheGivenFile() { ArgumentCaptor<String> url = ArgumentCaptor.forClass(String.class); ArgumentCaptor<File> file = ArgumentCaptor.forClass(File.class); fileUpload.uploadConditionChecker(FILENAME, testFile); verify(client).uploadFile(url.capture(), file.capture()); assertEquals(url.getValue(), CONDITION_CHECKER_UPLOAD_URL); assertEquals(file.getValue(), testFile); }