HttpRequestFactory { HttpDelete deleteLabelRequest(String contentId, String label) { assertMandatoryParameter(isNotBlank(contentId), "contentId"); assertMandatoryParameter(isNotBlank(label), "label"); return new HttpDelete(this.confluenceRestApiEndpoint + "/content/" + contentId + "/label?name=" + label); } HttpRequestFactory(String rootConfluenceUrl); HttpGet getAttachmentsRequest(String contentId, Integer limit, Integer start, String expandOptions); HttpGet getAttachmentContentRequest(String relativeDownloadLink); HttpGet getPropertyByKeyRequest(String contentId, String key); HttpDelete deletePropertyByKeyRequest(String contentId, String key); HttpPost setPropertyByKeyRequest(String contentId, String key, String value);  }
@Test public void deleteLabel_withValidParameters_returnsHttpDeleteRequest() { String contentId = "1234"; String label = "foo"; HttpDelete deleteLabelRequest = this.httpRequestFactory.deleteLabelRequest(contentId, label); assertThat(deleteLabelRequest.getURI().toString(), is(CONFLUENCE_REST_API_ENDPOINT + "/content/" + contentId + "/label?name=" + label)); }