@Test public void isSystemInitializedTest() { SystemStatusRepository systemStatusRepository = Mockito.mock(SystemStatusRepository.class); SystemStatusEntity systemStatus = new SystemStatusEntity(Boolean.TRUE, DateUtils.createCurrentDateTimestamp()); Mockito.when(systemStatusRepository.findById(Mockito.any())).thenReturn(Optional.of(systemStatus)); DefaultSystemStatusAccessor systemStatusUtility = new DefaultSystemStatusAccessor(systemStatusRepository); assertTrue(systemStatusUtility.isSystemInitialized()); }
@Override @Transactional public boolean isSystemInitialized() { return getSystemStatus().isInitialConfigurationPerformed(); }
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public boolean isSystemInitialized() { return getSystemStatus().isInitialConfigurationPerformed(); } }
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public boolean isSystemInitialized() { return getSystemStatus().isInitialConfigurationPerformed(); } @Autowired  DefaultSystemStatusAccessor(SystemStatusRepository systemStatusRepository); }
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public boolean isSystemInitialized() { return getSystemStatus().isInitialConfigurationPerformed(); } @Autowired  DefaultSystemStatusAccessor(SystemStatusRepository systemStatusRepository); @Override @Transactional boolean isSystemInitialized(); @Override @Transactional void setSystemInitialized(boolean systemInitialized); @Override @Transactional void startupOccurred(); @Override @Transactional OffsetDateTime getStartupTime(); }
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public boolean isSystemInitialized() { return getSystemStatus().isInitialConfigurationPerformed(); } @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; }