### Question:
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);  }### Answer:
@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); }
@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); }