@Test
public void getNumberOfPesWithoutType() 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<>();
    for(StatusType statusType: StatusType.values()) {
        listPesNumberByType.put(statusType.name(), (long) 0);
    }
    given(metricService.getNumberOfPes(any(), any(), eq(null))).willReturn(listPesNumberByType);
    this.mockMvc.perform(get("/api/pes/metric")
            .param("fromDate", formatedDateTime)
            .param("toDate", formatedDateTime))
            .andExpect(status().isOk());
    verify(metricService, times(1)).getNumberOfPes(any(), any(),eq(null));
    verifyNoMoreInteractions(metricService);
}