HttpRequestFactory { public HttpGet getPropertyByKeyRequest(String contentId, String key) { assertMandatoryParameter(isNotBlank(contentId), "contentId"); assertMandatoryParameter(isNotBlank(key), "key"); return new HttpGet(this.confluenceRestApiEndpoint + "/content/" + contentId + "/property/" + key + "?expand=value"); } 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 getPropertyByKeyRequest_withValidParameters_returnsHttpGetRequest() { String contentId = "1234"; String key = "content-hash"; HttpGet getPropertyByKeyRequest = this.httpRequestFactory.getPropertyByKeyRequest(contentId, key); assertThat(getPropertyByKeyRequest.getURI().toString(), is(CONFLUENCE_REST_API_ENDPOINT + "/content/" + contentId + "/property/" + key + "?expand=value")); }