### Question:
SegmentEffortTemplate extends AbstractStravaOperations implements SegmentEffortOperations { public List<StravaSegmentEffort> getAllSegmentEfforts(String segmentId, String startTime, String endTime) { MultiValueMap<String, String> parameters = new LinkedMultiValueMap<String, String>(); parameters.set("start_date_local", startTime); parameters.set("end_date_local", endTime); parameters.set("per_page", "200"); return restTemplate.getForObject(buildUri("/segments/" + segmentId + "/all_efforts", parameters), StravaSegmentEffortList.class); } SegmentEffortTemplate(RestTemplate restTemplate, boolean isAuthorizedForUser); List<StravaSegmentEffort> getSegmentEfforts(String segmentId, String athleteId); StravaSegmentEffort getSegmentEffortById(String id); List<StravaSegmentEffort> getAllSegmentEfforts(String segmentId, String startTime, String endTime);  }### Answer:
@Test public void testGetAllSegmentEfforts() throws Exception { mockServer.expect(requestTo("https: .andExpect(header("Authorization", "Bearer ACCESS_TOKEN")) .andRespond(withSuccess(new ClassPathResource("segmentEfforts.json", getClass()), MediaType.APPLICATION_JSON)); List<StravaSegmentEffort> segmentEfforts = strava.segmentEffortOperations().getAllSegmentEfforts("1234", "2006-04-21T13:20:40Z", "2006-04-22T13:20:40Z"); assertEquals(3, segmentEfforts.size()); StravaSegmentEffort segmentEffort = segmentEfforts.get(0); assertEquals(188196580, segmentEffort.getId()); assertEquals("SF2G San Bruno Ave Climb", segmentEffort.getName()); assertEquals("5099", segmentEffort.getAthlete().getId()); assertEquals(236.82, segmentEffort.getDistance(), .1); assertEquals("2006-04-21T13:20:40Z", segmentEffort.getDate()); assertEquals(345781, segmentEffort.getSegment().getId()); assertEquals(62, segmentEffort.getElapsedTime()); assertEquals(10740235, segmentEffort.getActivity().getId()); }