@Test
public void test_getAlerts_with_from_param() throws Exception{

    Collection<Alert> values = Arrays.asList(getAlert("alert1"),getAlert("alert2"));
    when(alertService.getAlerts(anyString())).thenReturn(values);
    mockMvc.perform(get("/alerts").param("from","test"))
        .andExpect(status().isOk())
        .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
        .andExpect(jsonPath("$", hasSize(2)))
        .andExpect(jsonPath("$[0].id", is("alert1")))
        .andExpect(jsonPath("$[1].id", is("alert2")))
    ;
}