HistoryServerClient { InputStream getCounters(String jobId) throws ServerConnectionException { try { String countersUrl = String.format(RETRIEVE_COUNTERS_URL_TEMPLATE, jobId); LOGGER.info("Retrieving counters of job '" + jobId + "' from '" + countersUrl + "'"); return getContentInputStream(countersUrl); } catch (IOException exception) { throw new ServerConnectionException(exception); } }    }
@Ignore @Test public void canGetCounters() throws Exception { InputStream countersStream = serverClient.getCounters("job_1498650116199_0092"); String countersString = IOUtils.toString(countersStream); System.out.println(countersString); }