### Question:
MenuUtil { public static String getMenusJson(String id, int level) { IMenuService menuService = getMenuService(); List<? extends IMenu> menus = null; if (menuService != null) { menus = menuService.getMenus(id, level); } else { menus = getAllModulesDefaultMenu(); } return convert(menus); }  static String getMenusJson(String id, int level);  }### Answer:
@Test public void testGetMenusJson() { String json = MenuUtil.getMenusJson(null, 0); JSONArray jsonArray = JSONArray.fromObject(json); Collection<?> collection = JSONArray.toCollection(jsonArray, DefaultMenu.class); Assert.assertEquals("获取菜单数据错误！", 1, collection.size()); System.out.println(json); }