DifferentialDiff { public QueryDiffsFields queryDiff(String diffId) { try { QueryDiffsResult queryDiffsResult = phabricatorHttpClient.postEntityAndCheckResponse( Method.DIFFERENTIAL_QUERYDIFFS, phabricatorHttpClient.withId(diffId), QueryDiffsResult.class); QueryDiffsFields queryDiffsFields = queryDiffsResult.getResult().get(diffId); return queryDiffsFields; } catch (Exception e) { throw new PhabricatorException("Can't get diff", e); } } @Autowired  DifferentialDiff(PhabricatorHttpClient phabricatorHttpClient); QueryDiffsFields queryDiff(String diffId);  }
@Test public void queryDiff() { Assume.assumeNotNull(phabricatorHttpClient, diffId); DifferentialDiff differentialDiff = new DifferentialDiff(phabricatorHttpClient); QueryDiffsFields revisionPHID = differentialDiff.queryDiff(diffId); QueryDiffsFields queryDiffsFields = differentialDiff.queryDiff(diffId); logger.debug("queryDiff, revision: {}, base commit: {}", queryDiffsFields.getRevisionId(), queryDiffsFields.getSourceControlBaseRevision()); }