@Test
public void test_getAlarmAlerts() throws Exception{

    Collection<Alert> values = Arrays.asList(getAlert("alert1"),getAlert("alert2"));
    Alert.Alerts alerts = new Alert.Alerts();
    alerts.setValues(values);
    when(alertService.getAlarmAlerts(anyString())).thenReturn(alerts);
    mockMvc.perform(get("/alarms/id/alerts")
    ).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")))
    ;
}