public static List<Group> enumerateFrom(Group root) {
        List<Group> leaves = new ArrayList<>();
        visitNode(root, leaves);
        return leaves;
    }
@Test
    void rootGroupCountedAsLeafWhenNoChildren() {
        Group g = new Group(0, "donkeykong");

        List<Group> leaves = LeafGroups.enumerateFrom(g);
        assertThat(leaves.size(), is(1));
        assertThat(leaves.get(0).getName(), is("donkeykong"));
    }