@Test
public void getSources() throws Exception {

    Long sourcesCount = sourceRepo.count();
    this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build();
    this.mockMvc.perform(get("/srv/api/sources")
        .accept(MediaType.parseMediaType("application/json")))
        .andExpect(status().isOk())
        .andExpect(content().contentType(API_JSON_EXPECTED_ENCODING))
        .andExpect(jsonPath("$", hasSize(sourcesCount.intValue())));
}