@Test
public void getSelection() throws Exception {

    this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build();
    UserSession session = ApiUtils.getUserSession( this.mockHttpSession);
    int selected = SelectionManager.getManager(session).getSelection(SelectionManager.SELECTION_METADATA).size();
    this.mockMvc.perform(get("/srv/api/selections/" + SelectionManager.SELECTION_METADATA)
        .session(this.mockHttpSession)
        .accept(MediaType.parseMediaType("application/json")))
        .andExpect(status().isOk())
        .andExpect(content().contentType(API_JSON_EXPECTED_ENCODING))
        .andExpect(jsonPath("$", hasSize(selected)));
}