@GetMapping("/logs")
  @PreAuthorize(value = "@apolloAuditLogQueryApiPreAuthorizer.hasQueryPermission()")
  public List<ApolloAuditLogDTO> findAllAuditLogs(int page, int size) {
    List<ApolloAuditLogDTO> logDTOList = api.queryLogs(page, size);
    return logDTOList;
  }
@Test
  public void testFindAllAuditLogs() throws Exception {

    {
      List<ApolloAuditLogDTO> mockLogDTOList = MockBeanFactory.mockAuditLogDTOListByLength(size);
      Mockito.when(api.queryLogs(Mockito.eq(page), Mockito.eq(size))).thenReturn(mockLogDTOList);
    }

    mockMvc.perform(MockMvcRequestBuilders.get("/apollo/audit/logs")
                .param("page", String.valueOf(page))
                .param("size", String.valueOf(size)))
        .andExpect(MockMvcResultMatchers.status().isOk())
        .andExpect(MockMvcResultMatchers.jsonPath("$").isArray())
        .andExpect(MockMvcResultMatchers.jsonPath("$.length()").value(size));

    Mockito.verify(api, Mockito.times(1)).queryLogs(Mockito.eq(page), Mockito.eq(size));
  }