HttpRequestFactory { HttpGet getLabelsRequest(String contentId) { assertMandatoryParameter(isNotBlank(contentId), "contentId"); return new HttpGet(this.confluenceRestApiEndpoint + "/content/" + contentId + "/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 getLabels_withValidParameters_returnsHttpGetRequest() { String contentId = "1234"; HttpGet getLabelsRequest = this.httpRequestFactory.getLabelsRequest(contentId); assertThat(getLabelsRequest.getURI().toString(), is(CONFLUENCE_REST_API_ENDPOINT + "/content/" + contentId + "/label")); }