PhabricatorHttpClient { public HttpEntity<MultiValueMap<String, Object>> getConstraintsForPHID(String phid) { HttpEntity<MultiValueMap<String, Object>> httpEntity = getHttpEntityFormUrlEncoded(); httpEntity.getBody().add(CONSTRAINTS_PHIDS_0, phid); return httpEntity; } 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 getConstraintsForPHID() { HttpEntity<MultiValueMap<String, Object>> constraintsForPHID = phabricatorHttpClient.getConstraintsForPHID("PHID-HMBT-sometest"); assertEquals("PHID-HMBT-sometest", constraintsForPHID.getBody().getFirst(CONSTRAINTS_PHIDS_0)); assertEquals("testtoken", constraintsForPHID.getBody().getFirst(API_TOKEN)); assertEquals(2, constraintsForPHID.getBody().size()); }