### Question:
TextTreeItemRenderer { public String getTreeAsText() { List<MenuItem> list = tree.getMenuItems(MenuTree.ROOT); if(list == null) { return "List is empty"; } StringBuilder sb = renderMenuLevel(list, 0); return sb.toString(); } TextTreeItemRenderer(MenuTree tree); String getTreeAsText();  }### Answer:
@Test void testRenderingOfComplexTree() { MenuTree tree = TestUtils.buildCompleteTree(); TextTreeItemRenderer renderer = new TextTreeItemRenderer(tree); String actual = renderer.getTreeAsText(); TestUtils.assertEqualsIgnoringCRLF( " Extra test\n" + " test 100dB\n" + " sub >>>\n" + " test 100dB\n" + " BoolTest ON\n" + " TextTest AAAAAAAAAA\n" + " FloatTest -12345.1235\n" + " ActionTest \n" + " Subnet Mask 127.0.0.1\n" + " List >>>\n", actual); }