SyncUtils { static SystemInstance getRemoteInstanceWithSyncImportStrategy( SystemSettingManager systemSettingManager, SyncEndpoint syncEndpoint ) { SystemInstance systemInstance = getRemoteInstance( systemSettingManager, syncEndpoint ); systemInstance.setUrl( systemInstance.getUrl() + SyncUtils.IMPORT_STRATEGY_SYNC_SUFFIX ); return systemInstance; } private  SyncUtils(); static Optional<AbstractWebMessageResponse> runSyncRequest( RestTemplate restTemplate,
        RequestCallback requestCallback, Class<? extends AbstractWebMessageResponse> klass, String syncUrl,
        int maxSyncAttempts ); static AvailabilityStatus isRemoteServerAvailable( SystemSettingManager systemSettingManager, RestTemplate restTemplate ); static void setLastSyncSuccess( SystemSettingManager systemSettingManager, SettingKey settingKey, Date time ); static Date getLastSyncSuccess( SystemSettingManager systemSettingManager, SettingKey settingKey );  }
@Test public void getRemoteInstanceWithSyncImportStrategyTest() { systemSettingManager.saveSystemSetting( SettingKey.REMOTE_INSTANCE_URL, URL ); SystemInstance systemInstance = SyncUtils.getRemoteInstanceWithSyncImportStrategy( systemSettingManager, SyncEndpoint.EVENTS ); assertThat( systemInstance.getUrl(), is( EVENTS_URL_WITH_SYNC_STRATEGY ) ); }