@FixFor( "MODE-1988" )
@Test
public void shouldEnableDocumentOptimizationWithValidChildCountTargetAndToleranceValues() {

    Document docOpt = Schematic.newDocument(FieldName.OPTIMIZATION_CHILD_COUNT_TARGET, 500,
                                            FieldName.OPTIMIZATION_CHILD_COUNT_TOLERANCE, 10);
    Document doc = Schematic.newDocument(FieldName.NAME, "repoName", FieldName.STORAGE,
                                         Schematic.newDocument(FieldName.DOCUMENT_OPTIMIZATION, docOpt));
    RepositoryConfiguration config = new RepositoryConfiguration(doc, "repoName");
    DocumentOptimization opt = config.getDocumentOptimization();
    assertThat(opt, is(notNullValue()));
    assertThat(opt.isEnabled(), is(true));
    assertThat(opt.getIntervalInHours(), is(Default.OPTIMIZATION_INTERVAL_IN_HOURS));
    assertThat(opt.getInitialTimeExpression(), is(Default.OPTIMIZATION_INITIAL_TIME));
    assertThat(opt.getThreadPoolName(), is(Default.OPTIMIZATION_POOL));
}