Menus { public List<Menu> list() { String url = WxEndpoint.get("url.menu.get"); String content = wxClient.get(url); logger.debug("lit menu: {}", content); MenuWrapper menuWrapper = JsonMapper.nonEmptyMapper().fromJson(content, MenuWrapper.class); List<Menu> menus = new ArrayList<>(); menus.add(menuWrapper.getMenu()); if (menuWrapper.getRuleMenus() != null && !menuWrapper.getRuleMenus().isEmpty()) { menus.addAll(menuWrapper.getRuleMenus()); } return menus; }  static Menus defaultMenus(); static Menus with(AppSetting appSetting); void setWxClient(WxClient wxClient); void create(Menu menu); String createRuleMenu(RuleMenu menu); void delete(); void delete(String menuId); Menu get(); List<RuleMenu> getRuleMenus(); MenuConfig getMenuConfig(); Menu match(String userId); List<Menu> list();  }
@Test public void testList() { List<Menu> menus = Menus.defaultMenus().list(); Assert.assertNotNull(menus); }