@Test public void nestedScopeHierarchyToString() {

  MortarScope root = MortarScope.buildRootScope().build("Root");
  root.buildChild().build("Cadet");
  MortarScope colonel = root.buildChild().build("Colonel");
  colonel.buildChild().build("ElderColonel");
  colonel.buildChild().build("ZeElderColonel");
  MortarScope elder = root.buildChild().build("Elder");
  elder.buildChild().build("ElderCadet");
  elder.buildChild().build("ZeElderCadet");
  elder.buildChild().build("ElderElder");
  elder.buildChild().build("AnElderCadet");
  String hierarchy = scopeHierarchyToString(root);
  assertThat(hierarchy).isEqualTo("" //
      + "Mortar Hierarchy:\n" //
      + BLANK + "SCOPE Root\n" //
      + BLANK + "+-SCOPE Cadet\n" //
      + BLANK + "+-SCOPE Colonel\n" //
      + BLANK + "| +-SCOPE ElderColonel\n" //
      + BLANK + "| `-SCOPE ZeElderColonel\n" //
      + BLANK + "`-SCOPE Elder\n" //
      + BLANK + "  +-SCOPE AnElderCadet\n" //
      + BLANK + "  +-SCOPE ElderCadet\n" //
      + BLANK + "  +-SCOPE ElderElder\n" //
      + BLANK + "  `-SCOPE ZeElderCadet\n" //
  );
}