### Question:
WxMenu implements Serializable { public static WxMenu fromJson(String json) { return WxGsonBuilder.create().fromJson(json, WxMenu.class); }  List<WxMenuButton> getButtons(); void setButtons(List<WxMenuButton> buttons); WxMenuRule getMatchRule(); void setMatchRule(WxMenuRule matchRule); String toJson(); static WxMenu fromJson(String json); static WxMenu fromJson(InputStream is); @Override String toString();  }### Answer:
@Test(dataProvider="wxReturnMenu") public void testFromJson(String json) { WxMenu menu = WxMenu.fromJson(json); Assert.assertEquals(menu.getButtons().size(), 3); }