diff --git a/ProgressOfTesting.txt b/ProgressOfTesting.txt
index 961b926..f6a9972 100644
--- a/ProgressOfTesting.txt
+++ b/ProgressOfTesting.txt
@@ -1,7 +1,7 @@
[x] 无需测试 - 6
[ ] 未开始测试 - 34
-[-] 测试未完成 - 15
-[Y] 测试完成 - 15
+[-] 测试未完成 - 14
+[Y] 测试完成 - 16
xyz.zhouxy.plusone.commons
├───annotation
@@ -97,4 +97,4 @@ xyz.zhouxy.plusone.commons
RegexTools.java [ ]
SnowflakeIdGenerator.java [ ]
StringTools.java [Y]
- TreeBuilder.java [-]
+ TreeBuilder.java [Y]
diff --git a/src/test/java/xyz/zhouxy/plusone/commons/util/TreeBuilderTests.java b/src/test/java/xyz/zhouxy/plusone/commons/util/TreeBuilderTests.java
index 753e267..4249c40 100644
--- a/src/test/java/xyz/zhouxy/plusone/commons/util/TreeBuilderTests.java
+++ b/src/test/java/xyz/zhouxy/plusone/commons/util/TreeBuilderTests.java
@@ -16,8 +16,14 @@
package xyz.zhouxy.plusone.commons.util;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
import java.io.Serializable;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
@@ -25,143 +31,203 @@ import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import com.google.gson.Gson;
import cn.hutool.core.util.ObjectUtil;
+import lombok.EqualsAndHashCode;
import lombok.ToString;
class TreeBuilderTests {
private static final Logger log = LoggerFactory.getLogger(TreeBuilderTests.class);
+
+ private final MenuItem A = MenuItem.of("A", "首页", "/home", 1);
+ private final MenuList B = MenuList.of("B", "系统管理", 3);
+ private final MenuItem B001 = /**/MenuItem.of("B", "B001", "功能管理", "/sys/function-mgmt", 4);
+ private final MenuItem B002 = /**/MenuItem.of("B", "B002", "角色管理", "/sys/role-mgmt", 3);
+ private final MenuItem B003 = /**/MenuItem.of("B", "B003", "账号管理", "/sys/account-mgmt", 2);
+ private final MenuItem B004 = /**/MenuItem.of("B", "B004", "系统参数管理", "/sys/param-mgmt", 1);
+ private final MenuList C = MenuList.of("C", "一级菜单C", 2);
+ private final MenuList C1 = /**/MenuList.of("C", "C1", "二级菜单C1", 3);
+ private final MenuItem C1001 = /**//**/MenuItem.of("C1", "C1001", "三级菜单C1001", "/c/c1/c1001", 1);
+ private final MenuItem C1002 = /**//**/MenuItem.of("C1", "C1002", "三级菜单C1002", "/c/c1/c1002", 2);
+ private final MenuItem C2 = /**/MenuItem.of("C", "C2", "二级菜单C2", "/c/c2", 1);
+ private final MenuItem C3 = /**/MenuItem.of("C", "C3", "二级菜单C3", "/c/c3", 2);
+
+ private final List