@Test
public void getAllRecordExtentAsJson() throws Exception {

    MockMvc mockMvc = MockMvcBuilders.webAppContextSetup(wac).build();
    MockHttpSession mockHttpSession = loginAsAdmin();
    String uuid = createTestData();
    mockMvc.perform(get(String.format("/srv/api/records/%s/extents.json", uuid))
        .session(mockHttpSession)
        .accept(MediaType.APPLICATION_JSON_VALUE))
        .andExpect(status().is2xxSuccessful())
        .andExpect(content().contentType(API_JSON_EXPECTED_ENCODING))
        .andExpect(jsonPath("$", hasSize(3)))
        .andExpect(jsonPath("$[0].href", is(String.format("http://localhost:8080/srv/api/records/%s/extents.png", uuid))))
        .andExpect(jsonPath("$[0].type", is("ALL")))
        .andExpect(jsonPath("$[1].href", is(String.format("http://localhost:8080/srv/api/records/%s/extents/1.png", uuid))))
        .andExpect(jsonPath("$[1].type", is("EX_BoundingPolygon")))
        .andExpect(jsonPath("$[1].description", is("")))
        .andExpect(jsonPath("$[2].type", is("EX_GeographicBoundingBox")));
}