	@Test
	public void testGetSegmentById() throws Exception {

		mockServer.expect(requestTo("https://www.strava.com/api/v3/segments/1234")).andExpect(method(GET))
				.andExpect(header("Authorization", "Bearer ACCESS_TOKEN"))
				.andRespond(withSuccess(new ClassPathResource("segment.json", getClass()), MediaType.APPLICATION_JSON));

        StravaSegment segment = strava.segmentOperations().getSegmentById("1234");

		assertEquals(229781, segment.getId());
		assertEquals("Hawk Hill", segment.getName());
        assertEquals("Ride", segment.getActivityType());
		assertEquals(2684.82, segment.getDistance(), .1);
		assertEquals("}g|e...VJr@", segment.getMap().getPolyline());
	}