@Test public void shouldCallTheProperStubConfigurationUploadUrlWithTheGivenFile() { ArgumentCaptor<String> url = ArgumentCaptor.forClass(String.class); ArgumentCaptor<File> file = ArgumentCaptor.forClass(File.class); fileUpload.uploadStubConfiguration(FILENAME, testFile); verify(client).uploadFile(url.capture(), file.capture()); assertEquals(url.getValue(), STUB_CONFIGURATION_UPLOAD_URL); assertEquals(file.getValue(), testFile); }
public boolean uploadStubConfiguration(String fileName, File file) { LOG.debug("Call stub configuration upload API."); String url = buildUrl(STUB_CONFIGURATION_UPLOAD_URL_POSTFIX, ImmutableMap.of(FILE_NAME, fileName)); return callFileUploadMethod(url, file); }
Upload { public boolean uploadStubConfiguration(String fileName, File file) { LOG.debug("Call stub configuration upload API."); String url = buildUrl(STUB_CONFIGURATION_UPLOAD_URL_POSTFIX, ImmutableMap.of(FILE_NAME, fileName)); return callFileUploadMethod(url, file); } }
Upload { public boolean uploadStubConfiguration(String fileName, File file) { LOG.debug("Call stub configuration upload API."); String url = buildUrl(STUB_CONFIGURATION_UPLOAD_URL_POSTFIX, ImmutableMap.of(FILE_NAME, fileName)); return callFileUploadMethod(url, file); } Upload(WilmaServiceConfig config);  Upload(WilmaServiceConfig config, WilmaHttpClient client); }
Upload { public boolean uploadStubConfiguration(String fileName, File file) { LOG.debug("Call stub configuration upload API."); String url = buildUrl(STUB_CONFIGURATION_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); }
Upload { public boolean uploadStubConfiguration(String fileName, File file) { LOG.debug("Call stub configuration upload API."); String url = buildUrl(STUB_CONFIGURATION_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);  }