test_class.declarator: mockMvc
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private MockMvc mockMvc;
test_class.type: MockMvc
test_class.var_name: mockMvc
test_class.declarator: metricService
test_class.modifier: @MockBean
      private
test_class.original_string: @MockBean
      private MetricService metricService;
test_class.type: MetricService
test_class.var_name: metricService
test_class.declarator: pesHistoryRepository
test_class.modifier: @MockBean
      private
test_class.original_string: @MockBean
      private PesHistoryRepository pesHistoryRepository;
test_class.type: PesHistoryRepository
test_class.var_name: pesHistoryRepository
test_class.declarator: entityManagerFactory
test_class.modifier: @MockBean
test_class.original_string: @MockBean
      EntityManagerFactory entityManagerFactory;
test_class.type: EntityManagerFactory
test_class.var_name: entityManagerFactory
test_class.declarator: certUtilService
test_class.modifier: @MockBean
test_class.original_string: @MockBean
      CertUtilService certUtilService;
test_class.type: CertUtilService
test_class.var_name: certUtilService
test_class.file: pes-service/src/test/java/fr/sictiam/stela/pesservice/controller/MetricControllerTest.java
test_class.identifier: MetricControllerTest
test_case.body: @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);
      }
test_case.class_method_signature: MetricControllerTest.getNumberOfPesWithoutType()
test_case.full_signature: @Test public void getNumberOfPesWithoutType()
test_case.identifier: getNumberOfPesWithoutType
test_case.invocations: now ofPattern format values put name willReturn given getNumberOfPes any any eq andExpect perform param param get isOk status getNumberOfPes verify times any any eq verifyNoMoreInteractions
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getNumberOfPesWithoutType()
focal_class.declarator: metricService
focal_class.modifier: private final
focal_class.original_string: private final MetricService metricService;
focal_class.type: MetricService
focal_class.var_name: metricService
focal_class.file: pes-service/src/main/java/fr/sictiam/stela/pesservice/controller/MetricController.java
focal_class.identifier: MetricController
focal_class.class_method_signature: MetricController.MetricController(MetricService metricService)
focal_class.full_signature: public  MetricController(MetricService metricService)
focal_class.identifier: MetricController
focal_class.modifiers: public
focal_class.parameters: (MetricService metricService)
focal_class.signature:  MetricController(MetricService metricService)
focal_class.class_method_signature: MetricController.getNumberOfPes(
              @RequestParam(value = "fromDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime fromDate,
              @RequestParam(value = "toDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime toDate,
              @RequestParam(value = "statusType", required = false) StatusType statusType)
focal_class.full_signature: @GetMapping public Map<String, Long> getNumberOfPes(
              @RequestParam(value = "fromDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime fromDate,
              @RequestParam(value = "toDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime toDate,
              @RequestParam(value = "statusType", required = false) StatusType statusType)
focal_class.identifier: getNumberOfPes
focal_class.modifiers: @GetMapping public
focal_class.parameters: (
              @RequestParam(value = "fromDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime fromDate,
              @RequestParam(value = "toDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime toDate,
              @RequestParam(value = "statusType", required = false) StatusType statusType)
focal_class.return: Map<String, Long>
focal_class.signature: Map<String, Long> getNumberOfPes(
              @RequestParam(value = "fromDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime fromDate,
              @RequestParam(value = "toDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime toDate,
              @RequestParam(value = "statusType", required = false) StatusType statusType)
focal_class.class_method_signature: MetricController.getNumberOfPesWithSample(
              @RequestParam(value = "fromDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime fromDate,
              @RequestParam(value = "toDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime toDate,
              @RequestParam(value = "statusType", required = false) StatusType statusType,
              @RequestParam(value = "sample", required = false) String sample)
focal_class.full_signature: @GetMapping("/sample") public Map<String, List<Map<LocalDateTime, Long>>> getNumberOfPesWithSample(
              @RequestParam(value = "fromDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime fromDate,
              @RequestParam(value = "toDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime toDate,
              @RequestParam(value = "statusType", required = false) StatusType statusType,
              @RequestParam(value = "sample", required = false) String sample)
focal_class.identifier: getNumberOfPesWithSample
focal_class.modifiers: @GetMapping("/sample") public
focal_class.parameters: (
              @RequestParam(value = "fromDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime fromDate,
              @RequestParam(value = "toDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime toDate,
              @RequestParam(value = "statusType", required = false) StatusType statusType,
              @RequestParam(value = "sample", required = false) String sample)
focal_class.return: Map<String, List<Map<LocalDateTime, Long>>>
focal_class.signature: Map<String, List<Map<LocalDateTime, Long>>> getNumberOfPesWithSample(
              @RequestParam(value = "fromDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime fromDate,
              @RequestParam(value = "toDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime toDate,
              @RequestParam(value = "statusType", required = false) StatusType statusType,
              @RequestParam(value = "sample", required = false) String sample)
focal_method.body: @GetMapping
      public Map<String, Long> getNumberOfPes(
              @RequestParam(value = "fromDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime fromDate,
              @RequestParam(value = "toDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime toDate,
              @RequestParam(value = "statusType", required = false) StatusType statusType) {
          return metricService.getNumberOfPes(fromDate, toDate, statusType);
      }
focal_method.class_method_signature: MetricController.getNumberOfPes(
              @RequestParam(value = "fromDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime fromDate,
              @RequestParam(value = "toDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime toDate,
              @RequestParam(value = "statusType", required = false) StatusType statusType)
focal_method.full_signature: @GetMapping public Map<String, Long> getNumberOfPes(
              @RequestParam(value = "fromDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime fromDate,
              @RequestParam(value = "toDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime toDate,
              @RequestParam(value = "statusType", required = false) StatusType statusType)
focal_method.identifier: getNumberOfPes
focal_method.invocations: getNumberOfPes
focal_method.modifiers: @GetMapping public
focal_method.parameters: (
              @RequestParam(value = "fromDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime fromDate,
              @RequestParam(value = "toDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime toDate,
              @RequestParam(value = "statusType", required = false) StatusType statusType)
focal_method.return: Map<String, Long>
focal_method.signature: Map<String, Long> getNumberOfPes(
              @RequestParam(value = "fromDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime fromDate,
              @RequestParam(value = "toDate") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime toDate,
              @RequestParam(value = "statusType", required = false) StatusType statusType)