@Override
    public String rendering() {
        final StringBuilder ladderSB = new StringBuilder();
        int deep = 0;
        for (String item : items) {

            // no separator is required for the first item
            if (deep == 0) {
                ladderSB.append(item).append(System.lineSeparator());
            }

            // need separator for others
            else {
                ladderSB.append(repeat(STEP_CHAR, deep * INDENT_STEP))
                        .append(LADDER_CHAR)
                        .append(item)
                        .append(System.lineSeparator());
            }

            deep++;
        }
        return ladderSB.toString();
    }
@Test
    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" + System.lineSeparator() + "  `-2"
                + System.lineSeparator() + "    `-3"
                + System.lineSeparator() + "      `-4"
                + System.lineSeparator();
        assertThat(result, equalTo(expected));
        System.out.println(result);
    }