### Question:
AuditLogServiceImpl extends AbstractBaseService<AuditLogEntity> implements AuditLogService { @Override public long getMindId() { Long minId = auditLogRepository.getMinId(); if (minId == null) { return 0L; } else { return minId; } }  @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 getMindIdTest() { 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(); when(auditLogRepository.getMinId()).thenReturn(null); assertEquals(0L, auditLogServiceImpl.getMindId()); when(auditLogRepository.getMinId()).thenReturn(1L); assertEquals(1L, auditLogServiceImpl.getMindId()); }