### Question:
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public void startupOccurred() { SystemStatusEntity systemStatus = getSystemStatus(); SystemStatusEntity newSystemStatus = new SystemStatusEntity(systemStatus.isInitialConfigurationPerformed(), createCurrentDateTimestamp()); updateSystemStatus(newSystemStatus); } @Autowired  DefaultSystemStatusAccessor(SystemStatusRepository systemStatusRepository); @Override @Transactional boolean isSystemInitialized(); @Override @Transactional void setSystemInitialized(boolean systemInitialized); @Override @Transactional void startupOccurred(); @Override @Transactional OffsetDateTime getStartupTime(); static final Long SYSTEM_STATUS_ID; }### Answer:
@Test public void startupOccurred() { SystemStatusRepository systemStatusRepository = new MockSystemStatusRepository(Boolean.FALSE); DefaultSystemStatusAccessor systemStatusUtility = new DefaultSystemStatusAccessor(systemStatusRepository); systemStatusUtility.startupOccurred(); LocalDateTime estimatedDate = LocalDateTime.now(); SystemStatusEntity testSystemStatus = systemStatusRepository.findAll().get(0); LocalDateTime systemStatusLocalDateTime = testSystemStatus.getStartupTime() .toInstant() .atZone(ZoneId.systemDefault()) .toLocalDateTime(); assertFalse(testSystemStatus.isInitialConfigurationPerformed()); assertNotNull(testSystemStatus.getStartupTime()); assertEquals(estimatedDate.getHour(), systemStatusLocalDateTime.getHour()); assertEquals(estimatedDate.getMinute(), systemStatusLocalDateTime.getMinute()); }