@Test public void synchronizeAtStartupMode() { when(this.source.getProperty(DefaultSolrConfiguration.SOLR_SYNCHRONIZE_AT_STARTUP_MODE, DefaultSolrConfiguration.SOLR_SYNCHRONIZE_AT_STARTUP_MODE_DEFAULT.name())).thenReturn("farm"); assertEquals(SolrConfiguration.SynchronizeAtStartupMode.FARM, this.configuration.synchronizeAtStartupMode()); when(this.source.getProperty(DefaultSolrConfiguration.SOLR_SYNCHRONIZE_AT_STARTUP_MODE, DefaultSolrConfiguration.SOLR_SYNCHRONIZE_AT_STARTUP_MODE_DEFAULT.name())).thenReturn("FARM"); assertEquals(SolrConfiguration.SynchronizeAtStartupMode.FARM, this.configuration.synchronizeAtStartupMode()); when(this.source.getProperty(DefaultSolrConfiguration.SOLR_SYNCHRONIZE_AT_STARTUP_MODE, DefaultSolrConfiguration.SOLR_SYNCHRONIZE_AT_STARTUP_MODE_DEFAULT.name())).thenReturn("foobar"); assertEquals(SolrConfiguration.SynchronizeAtStartupMode.FARM, this.configuration.synchronizeAtStartupMode()); when(this.source.getProperty(DefaultSolrConfiguration.SOLR_SYNCHRONIZE_AT_STARTUP_MODE, DefaultSolrConfiguration.SOLR_SYNCHRONIZE_AT_STARTUP_MODE_DEFAULT.name())).thenReturn("wiki"); assertEquals(SolrConfiguration.SynchronizeAtStartupMode.WIKI, this.configuration.synchronizeAtStartupMode()); when(this.source.getProperty(DefaultSolrConfiguration.SOLR_SYNCHRONIZE_AT_STARTUP_MODE, DefaultSolrConfiguration.SOLR_SYNCHRONIZE_AT_STARTUP_MODE_DEFAULT.name())).thenReturn("WIKI"); assertEquals(SolrConfiguration.SynchronizeAtStartupMode.WIKI, this.configuration.synchronizeAtStartupMode()); when(this.source.getProperty(DefaultSolrConfiguration.SOLR_SYNCHRONIZE_AT_STARTUP_MODE, DefaultSolrConfiguration.SOLR_SYNCHRONIZE_AT_STARTUP_MODE_DEFAULT.name())).thenReturn(""); assertEquals(SolrConfiguration.SynchronizeAtStartupMode.FARM, this.configuration.synchronizeAtStartupMode()); }
@Override public SynchronizeAtStartupMode synchronizeAtStartupMode() { String value = this.configuration.getProperty(SOLR_SYNCHRONIZE_AT_STARTUP_MODE, SOLR_SYNCHRONIZE_AT_STARTUP_MODE_DEFAULT.name()); SynchronizeAtStartupMode result; try { result = SynchronizeAtStartupMode.valueOf(value.toUpperCase()); } catch (IllegalArgumentException e) { result = SOLR_SYNCHRONIZE_AT_STARTUP_MODE_DEFAULT; } return result; }
DefaultSolrConfiguration implements SolrConfiguration { @Override public SynchronizeAtStartupMode synchronizeAtStartupMode() { String value = this.configuration.getProperty(SOLR_SYNCHRONIZE_AT_STARTUP_MODE, SOLR_SYNCHRONIZE_AT_STARTUP_MODE_DEFAULT.name()); SynchronizeAtStartupMode result; try { result = SynchronizeAtStartupMode.valueOf(value.toUpperCase()); } catch (IllegalArgumentException e) { result = SOLR_SYNCHRONIZE_AT_STARTUP_MODE_DEFAULT; } return result; } }
DefaultSolrConfiguration implements SolrConfiguration { @Override public SynchronizeAtStartupMode synchronizeAtStartupMode() { String value = this.configuration.getProperty(SOLR_SYNCHRONIZE_AT_STARTUP_MODE, SOLR_SYNCHRONIZE_AT_STARTUP_MODE_DEFAULT.name()); SynchronizeAtStartupMode result; try { result = SynchronizeAtStartupMode.valueOf(value.toUpperCase()); } catch (IllegalArgumentException e) { result = SOLR_SYNCHRONIZE_AT_STARTUP_MODE_DEFAULT; } return result; }  }
DefaultSolrConfiguration implements SolrConfiguration { @Override public SynchronizeAtStartupMode synchronizeAtStartupMode() { String value = this.configuration.getProperty(SOLR_SYNCHRONIZE_AT_STARTUP_MODE, SOLR_SYNCHRONIZE_AT_STARTUP_MODE_DEFAULT.name()); SynchronizeAtStartupMode result; try { result = SynchronizeAtStartupMode.valueOf(value.toUpperCase()); } catch (IllegalArgumentException e) { result = SOLR_SYNCHRONIZE_AT_STARTUP_MODE_DEFAULT; } return result; }  @Override String getServerType(); @Override T getInstanceConfiguration(String instanceType, String propertyName, T defaultValue); @Override InputStream getSearchCoreDefaultContent(); @Override InputStream getMinimalCoreDefaultContent(); @Override int getIndexerBatchSize(); @Override int getIndexerBatchMaxLengh(); @Override int getIndexerQueueCapacity(); @Override boolean synchronizeAtStartup(); @Override String getHomeDirectory(); @Override String getDefaultHomeDirectory(); @Override SynchronizeAtStartupMode synchronizeAtStartupMode(); }
DefaultSolrConfiguration implements SolrConfiguration { @Override public SynchronizeAtStartupMode synchronizeAtStartupMode() { String value = this.configuration.getProperty(SOLR_SYNCHRONIZE_AT_STARTUP_MODE, SOLR_SYNCHRONIZE_AT_STARTUP_MODE_DEFAULT.name()); SynchronizeAtStartupMode result; try { result = SynchronizeAtStartupMode.valueOf(value.toUpperCase()); } catch (IllegalArgumentException e) { result = SOLR_SYNCHRONIZE_AT_STARTUP_MODE_DEFAULT; } return result; }  @Override String getServerType(); @Override T getInstanceConfiguration(String instanceType, String propertyName, T defaultValue); @Override InputStream getSearchCoreDefaultContent(); @Override InputStream getMinimalCoreDefaultContent(); @Override int getIndexerBatchSize(); @Override int getIndexerBatchMaxLengh(); @Override int getIndexerQueueCapacity(); @Override boolean synchronizeAtStartup(); @Override String getHomeDirectory(); @Override String getDefaultHomeDirectory(); @Override SynchronizeAtStartupMode synchronizeAtStartupMode(); static final String SOLR_TYPE_PROPERTY; static final String SOLR_TYPE_DEFAULT; @Deprecated
    static final String DEFAULT_SOLR_TYPE; static final String CLASSPATH_LOCATION_PREFIX; static final String CONF_DIRECTORY; static final String CONF_FILE_LOCATION_PATTERN; static final String[] HOME_DIRECTORY_FILE_NAMES; static final String HOME_DIRECTORY_CORE_PACKAGE; static final String HOME_DIRECTORY_PREFIX; static final String SOLR_INDEXER_BATCH_SIZE_PROPERTY; static final int SOLR_INDEXER_BATCH_SIZE_DEFAULT; static final String SOLR_INDEXER_BATCH_MAXLENGH_PROPERTY; static final int SOLR_INDEXER_BATCH_MAXLENGH_DEFAULT; static final String SOLR_INDEXER_QUEUE_CAPACITY_PROPERTY; static final int SOLR_INDEXER_QUEUE_CAPACITY_DEFAULT; static final String SOLR_SYNCHRONIZE_AT_STARTUP; static final boolean SOLR_SYNCHRONIZE_AT_STARTUP_DEFAULT; static final String SOLR_SYNCHRONIZE_AT_STARTUP_MODE; static final SynchronizeAtStartupMode SOLR_SYNCHRONIZE_AT_STARTUP_MODE_DEFAULT; }