@Test
public void getNumberOfPesWithType() throws Exception {

    LocalDateTime localDateTimeNow = LocalDateTime.now();
    DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
    String formatedDateTime = localDateTimeNow.format(formatter);
    Map<String, Long> listPesNumberByType = new HashMap<>();
    listPesNumberByType.put(StatusType.CLASSEUR_SIGNED.name(), (long) 0);
    given(metricService.getNumberOfPes(any(), any(), eq(StatusType.CLASSEUR_SIGNED))).willReturn(listPesNumberByType);
    this.mockMvc.perform(get("/api/pes/metric")
            .param("fromDate", formatedDateTime)
            .param("toDate", formatedDateTime)
            .param("statusType", StatusType.CLASSEUR_SIGNED.name()))
            .andExpect(status().isOk());
    verify(metricService, times(1)).getNumberOfPes(any(), any(),eq(StatusType.CLASSEUR_SIGNED));
    verifyNoMoreInteractions(metricService);
}