DifferentialRevision { @SuppressWarnings("Duplicates") public void addComment(String objectIdentifier, String value) throws PhabricatorException { logger.debug("Add reviewer: {} from: {}", value, objectIdentifier); HttpEntity<MultiValueMap<String, Object>> httpEntity = phabricatorHttpClient.getHttpEntityFormUrlEncoded(); httpEntity.getBody().add(TRANSACTIONS_0_TYPE, TX_TYPE_COMMENT); httpEntity.getBody().add(TRANSACTIONS_0_VALUE, value); httpEntity.getBody().add(OBJECT_IDENTIFIER, objectIdentifier); phabricatorHttpClient.postEntityAndCheckResponse(Method.DIFFERENTIAL_REVISION_EDIT, httpEntity, ResultWithError.class); } DifferentialRevision(PhabricatorHttpClient phabricatorHttpClient); @SuppressWarnings("Duplicates") void addComment(String objectIdentifier, String value); void removeReviewer(String objectIdentifier, String value, boolean blocking); void addReviewer(String objectIdentifier, String value, boolean blocking);  }
@Test public void testAddComment() throws PhabricatorException { Assume.assumeNotNull(differentialRevision, objectIdentifier); differentialRevision.addComment(objectIdentifier, "test comment with **bold** and \n new line"); }