source: class ForumStructureTest {
  
      private static final int TOP_LEVEL_ID;
      private Forum bookmarks;
      private Forum discussion;
      private Forum shsc;
      private Forum games;
      private Forum cobol;
      private Forum projectlog;
      private Forum bookmarksDup;
      private Forum discussionDup;
      private Forum shscDup;
      private Forum gamesDup;
      private Forum cobolDup;
      private Forum projectlogDup;
      private List<Forum> sourceTree;
      private List<Forum> partialTree;
  
      @Test
      public void buildFromOrderedList() throws Exception {
  
target:         // create an ordered, flat list of the forums in sourceTree
          List<Forum> sourceList = new ArrayList<>();
          Collections.addAll(sourceList, bookmarks, discussion, shsc, games, cobol, projectlog);
  
          // build a ForumStructure from the flat list, and get the tree it creates
          ForumStructure forumStructure = ForumStructure.buildFromOrderedList(sourceList, TOP_LEVEL_ID);
          List<Forum> builtTree = forumStructure.getAsList().formatAs(FULL_TREE).build();
  
          // the built tree should match sourceTree
          assertThat(builtTree, is(aForumTreeMatching(sourceTree)));
      }
  
  }