ConnectionTemplate implements ConnectionOperations { public NetworkStatistics getNetworkStatistics(){ return restOperations.getForObject(STATISTICS_URL, NetworkStatistics.class); } ConnectionTemplate(RestOperations restOperations); List<LinkedInProfile> getConnections(); List<LinkedInProfile> getConnections(int start, int count); NetworkStatistics getNetworkStatistics();  }
@Test public void getStatistics() { mockServer.expect(requestTo("https: .andRespond(withSuccess(new ClassPathResource("statistics.json", getClass()), MediaType.APPLICATION_JSON)); NetworkStatistics stats = linkedIn.connectionOperations().getNetworkStatistics(); assertEquals(189, stats.getFirstDegreeCount()); assertEquals(50803, stats.getSecondDegreeCount()); }