@Test public void shouldCallTheProperStubConfigurationUploadUrlWithTheGivenStringResource() { ArgumentCaptor<String> url = ArgumentCaptor.forClass(String.class); ArgumentCaptor<String> resource = ArgumentCaptor.forClass(String.class); given(wilmaStub.toString()).willReturn(FILENAME); fileUpload.uploadStubConfiguration(wilmaStub); verify(client).uploadString(url.capture(), resource.capture()); assertEquals(url.getValue(), STUB_CONFIGURATION_UPLOAD_URL_FOR_STRING); assertEquals(resource.getValue(), FILENAME); }
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);  }