PhabricatorHttpClient { public HttpEntity<MultiValueMap<String, Object>> getHttpEntityFormUrlEncoded() { HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); MultiValueMap<String, Object> body = new LinkedMultiValueMap<>(); body.add(API_TOKEN, authToken); return new HttpEntity<>(body, headers); } PhabricatorHttpClient(String baseUrl, String authToken); T postEntityAndCheckResponse(
            Method method,
            HttpEntity<MultiValueMap<String, Object>> httpEntity,
            Class<T> clazz); HttpEntity<MultiValueMap<String, Object>> getHttpEntityFormUrlEncoded(); HttpEntity<MultiValueMap<String, Object>> getConstraintsForPHID(String phid); HttpEntity<MultiValueMap<String, Object>> withId(String id);  }
@Test public void getHttpEntityFormUrlEncoded() { HttpEntity<MultiValueMap<String, Object>> constraintsForPHID = phabricatorHttpClient.getHttpEntityFormUrlEncoded(); assertEquals("testtoken", constraintsForPHID.getBody().getFirst(API_TOKEN)); assertEquals(1, constraintsForPHID.getBody().size()); }