### Question:
TLadder implements TComponent { @Override public String rendering() { final StringBuilder ladderSB = new StringBuilder(); int deep = 0; for (String item : items) { if (deep == 0) { ladderSB .append(item) .append(System.lineSeparator()); } else { ladderSB .append(repeat(STEP_CHAR, deep * INDENT_STEP)) .append(LADDER_CHAR) .append(item) .append(System.lineSeparator()); } deep++; } return ladderSB.toString(); }  @Override String rendering(); TLadder addItem(String item);  }### Answer:
@Test public void testRendering() throws Exception { TLadder ladder = new TLadder(); ladder.addItem("1"); ladder.addItem("2"); ladder.addItem("3"); ladder.addItem("4"); String result = ladder.rendering(); String expected = "1\n" + " `-2\n" + " `-3\n" + " `-4\n"; assertThat(result, equalTo(expected)); System.out.println(result); }