### Question:
SignUtils { @Deprecated public static String createSign(Object xmlBean, String signKey) { return createSign(xmlBean2Map(xmlBean), signKey); }  @Deprecated static String createSign(Object xmlBean, String signKey); @Deprecated static String createSign(Map<String, String> params, String signKey); static String createSign(Object xmlBean, String signType, String signKey, boolean isIgnoreSignType); static String createSign(Map<String, String> params, String signType, String signKey, boolean ignoreSignType); static boolean checkSign(Object xmlBean, String signType, String signKey); static boolean checkSign(Map<String, String> params, String signType, String signKey); static Map<String, String> xmlBean2Map(Object bean);  }### Answer:
@Test public void testCreateSign() throws Exception { String signKey = "192006250b4c09247ec02edce69f6a2d"; String message = "appid=wxd930ea5d5a258f4f&body=test&device_info=1000&mch_id=10000100&nonce_str=ibuaiVcKdpRxkhJA"; assertEquals(SignUtils.createSign((Splitter.on("&").withKeyValueSeparator("=").split(message)), null, signKey, false), "9A0A8659F005D6984697E2CA0A9CF3B7"); }
@Test public void testCreateSign_HMACSHA256() throws Exception { String signKey = "192006250b4c09247ec02edce69f6a2d"; final String message = "appid=wxd930ea5d5a258f4f&body=test&device_info=1000&mch_id=10000100&nonce_str=ibuaiVcKdpRxkhJA"; String sign = SignUtils.createSign(Splitter.on("&").withKeyValueSeparator("=").split(message), HMAC_SHA256, signKey, false); assertEquals(sign, "6A9AE1657590FD6257D693A078E1C3E4BB6BA4DC30B23E0EE2496E54170DACD6"); }