@Test
public void should_return_all_order_ids_sorted_by_date_descending() throws Exception {

    Incident[] orders = new Incident[]{new Incident(3), new Incident(2), new Incident(1)};
    List<Incident> orderList = Arrays.asList(orders);
    when(incidentDao.getAllIncidentsOrderByDate(false, PrimeroAppConfiguration.getCurrentUser().getUsername(),
            TextUtils.lintUrl(url))).thenReturn(orderList);
    assertThat("When call getAllOrderByDateDES() should return orders sorted by date.",
            incidentService.getAllOrderByDateDES(), is(Arrays.asList(new Long[]{3L, 2L, 1L})));
    verify(incidentDao, times(1)).getAllIncidentsOrderByDate(false, PrimeroAppConfiguration.getCurrentUser()
            .getUsername(), TextUtils.lintUrl(url));
}