ProfileVisitsResource extends Resource { public CallSpec<List<ProfileVisit>, HttpError> getUsersProfileVisits(String userId) { return Resource.<List<ProfileVisit>, HttpError>newGetSpec(api, "/v1/users/{user_id}/visits") .responseAs(list(ProfileVisit.class, "visits")) .pathParam("user_id", userId) .build(); } ProfileVisitsResource(XingApi api); CallSpec<List<ProfileVisit>, HttpError> getUsersProfileVisits(String userId); CallSpec<List<ProfileVisit>, HttpError> getOwnProfileVisits(); CallSpec<Void, HttpError> createProfileVisits(String userId);  }
@Test public void getUsersProfileVisits() throws Exception { testGetProfileVisits(resource.getUsersProfileVisits("some_id")); }