### Question:
AuditLogServiceImpl extends AbstractBaseService<AuditLogEntity> implements AuditLogService { @Override public AuditLogResponse logList(AuditLogRequest auditLogRequest) { Map<String, Object> conditionMap = new HashMap<>(); if (StringUtils.isNotEmpty(auditLogRequest.getTbName())) { conditionMap.put(AuditLogEntity.FdTbName, auditLogRequest.getTbName()); } if (StringUtils.isNotEmpty(auditLogRequest.getRefId())) { conditionMap.put(AuditLogEntity.FdRefId, auditLogRequest.getRefId()); } if (StringUtils.isNotEmpty(auditLogRequest.getContent())) { conditionMap.put(AuditLogEntity.FdContent, auditLogRequest.getContent()); } if (StringUtils.isNotEmpty(auditLogRequest.getId())) { conditionMap.put(AuditLogEntity.FdId, Long.valueOf(auditLogRequest.getId())); } Long count = count(conditionMap); if (count == 0) { return new AuditLogResponse(count, null); } return new AuditLogResponse(count, getList(conditionMap, Long.valueOf(auditLogRequest.getPage()), Long.valueOf(auditLogRequest.getLimit()))); }  @Override long insert(AuditLogEntity entity); @Override long getMindId(); @Override void deleteBy(Long minId); @Override void recordAudit(String tbName, long refId, String content); @Override AuditLogResponse logList(AuditLogRequest auditLogRequest);  }### Answer:
@Test public void logListTest() { AuditLogServiceImpl auditLogServiceImpl=new AuditLogServiceImpl(); UserInfoHolder userInfoHolder=mock(UserInfoHolder.class); AuditLogRepository auditLogRepository=mock(AuditLogRepository.class); ReflectionTestUtils.setField(auditLogServiceImpl, "userInfoHolder", userInfoHolder); ReflectionTestUtils.setField(auditLogServiceImpl, "auditLogRepository", auditLogRepository); auditLogServiceImpl.init(); AuditLogRequest request=new AuditLogRequest(); request.setTbName("test"); request.setContent("tet"); request.setLimit("1"); request.setPage("1"); request.setRefId("1"); when(auditLogRepository.count(any(Map.class))).thenReturn(0L); assertEquals(0L, (long)(auditLogServiceImpl.logList(request).getCount())); when(auditLogRepository.count(any(Map.class))).thenReturn(1L); assertEquals(1L, (long)(auditLogServiceImpl.logList(request).getCount())); }