search/indexer/mmm-search-indexer-api/src/test/java/net/sf/mmm/search/indexer/base/state/SearchIndexStateManagerTest.java
/**
   * This method checks the {@link SearchIndexerState} if created by default
   * from empty state-configuration according to
   * {@link #createIndexerConfiguration(String)} .
   * 
   * @param state is the {@link SearchIndexerState} to check.
   */
This method checks the  SearchIndexerState if created by default
from empty state-configuration according to
#createIndexerConfiguration(String) .

@param state is the  SearchIndexerState to check.
This method checks the SearchIndexerState if created by default from empty state - configuration according to #createIndexerConfiguration ( String ) . @param state is the SearchIndexerState to check .
private void checkEmptyState(SearchIndexerState state) {
    SearchIndexerDataLocationState locationState;
    SearchIndexerSourceState sourceState;
    sourceState = state.getSourceState(SOURCE_BAR);
    Assert.assertNotNull(sourceState);
    Assert.assertEquals(SOURCE_BAR, sourceState.getSource());
    Assert.assertNull(sourceState.getIndexingDate());
    locationState = sourceState.getLocationState(LOCATION_DATA);
    Assert.assertNotNull(locationState);
    Assert.assertEquals(LOCATION_DATA, locationState.getLocation());
    Assert.assertNull(locationState.getRevision());
    sourceState = state.getSourceState(SOURCE_FOO);
    Assert.assertNotNull(sourceState);
    Assert.assertEquals(SOURCE_FOO, sourceState.getSource());
    Assert.assertNull(sourceState.getIndexingDate());
    locationState = sourceState.getLocationState(LOCATION_MUSIC);
    Assert.assertNotNull(locationState);
    Assert.assertEquals(LOCATION_MUSIC, locationState.getLocation());
    Assert.assertNull(locationState.getRevision());
    Assert.assertNull(state.getSourceState("not-existing-source"));
    Assert.assertNull(sourceState.getLocationState("not-existing-location"));
  }
private void checkEmptyState ( SearchIndexerState state ) { SearchIndexerDataLocationState locationState ; SearchIndexerSourceState sourceState ; sourceState = state . getSourceState ( SOURCE_BAR ) ; Assert . assertNotNull ( sourceState ) ; Assert . assertEquals ( SOURCE_BAR , sourceState . getSource ( ) ) ; Assert . assertNull ( sourceState . getIndexingDate ( ) ) ; locationState = sourceState . getLocationState ( LOCATION_DATA ) ; Assert . assertNotNull ( locationState ) ; Assert . assertEquals ( LOCATION_DATA , locationState . getLocation ( ) ) ; Assert . assertNull ( locationState . getRevision ( ) ) ; sourceState = state . getSourceState ( SOURCE_FOO ) ; Assert . assertNotNull ( sourceState ) ; Assert . assertEquals ( SOURCE_FOO , sourceState . getSource ( ) ) ; Assert . assertNull ( sourceState . getIndexingDate ( ) ) ; locationState = sourceState . getLocationState ( LOCATION_MUSIC ) ; Assert . assertNotNull ( locationState ) ; Assert . assertEquals ( LOCATION_MUSIC , locationState . getLocation ( ) ) ; Assert . assertNull ( locationState . getRevision ( ) ) ; Assert . assertNull ( state . getSourceState ( "not-existing-source" ) ) ; Assert . assertNull ( sourceState . getLocationState ( "not-existing-location" ) ) ; }
This method checks the {@link SearchIndexerState} if created by default
 from empty state-configuration according to
 {@link #createIndexerConfiguration(String)} .
This method checks the { @link SearchIndexerState } if created by default from empty state - configuration according to { @link #createIndexerConfiguration ( String ) } .
// check empty sources and locations are created // bar source // locations for bar // foo source // locations for foo // check empty locations are created