SkeletonToTreeConverter { void createTreeLevels(ReportingTree<?> tree, ReportSkeleton skeleton) { ReportingTreeNode<?> currentNode = tree.root(); createLevelSkeleton(currentNode, skeleton.root()); if (logger.isTraceEnabled()) { logger.trace(skeleton.toString()); } }    }
@Test public void shouldCreateLevelsInsideReportingTreeBasedOnSkeletonWithMatchingDictionaryOnlyFlag() { ReportingTree<String> tree = reportingTree().withOnlyExactLevels(4).build(); ReportSkeleton skeleton = ReportSkeleton.reportSkeleton() .withLevel(level() .withChild("A", level() ) ); logger.debug(skeleton.toString()); skeletonToTreeConverter.createTreeLevels(tree, skeleton); assertThat(tree).hasDepth(4).levelAt(1).isDictionaryLevel(); }
@Test public void shouldCreateLevelsInsideReportingTreeWhenMultipleDictionaryLevelsStack() { ReportingTree<String> tree = reportingTree().withOnlyExactLevels(4).build(); ReportSkeleton skeleton = ReportSkeleton.reportSkeleton(); skeleton.withLevel( "FIRST", ReportLevel.level().withChild( "SECOND_A", ReportLevel.level().withChild( ReportLevel.level().withChild( ReportLevel.level() ) ) ) ); logger.debug(skeleton.toString()); skeletonToTreeConverter.createTreeLevels(tree, skeleton); assertThat(tree).hasDepth(4) .levelAt(0).isDictionaryLevel() .levelAt(1).isDictionaryLevel() .levelAt(2).isNotDictionaryLevel(); }