ProfileTemplate extends AbstractTemplate implements ProfileOperations { public String getProfileId() { return getUserProfile().getId(); } ProfileTemplate(String xingBaseUrl, RestOperations restOperations, ObjectMapper objectMapper);  ProfileTemplate(RestOperations restOperations, ObjectMapper objectMapper); String getProfileId(); XingProfile getUserProfile(); XingProfile getProfileById(String id);  }
@Test public void getProfileId() { mockServer.expect(requestTo(XingTemplate.DEFAULT_BASE_URL + ProfileTemplate.USERS_URL.replaceFirst("\\{id\\}", "me"))).andExpect(method(GET)) .andRespond(withSuccess(new ClassPathResource("testdata/profile.json", getClass()), MediaType.APPLICATION_JSON)); assertEquals("6628146_33f97b", xing.profileOperations().getProfileId()); }