BCSalesService { public BCCouponResult queryCoupon(String id) { String url = BCHttpClientUtil.BEECLOUD_HOST + "/2/rest/coupon"; return (BCCouponResult) BCHttpClientUtil.queryRestObjectById(url, id, BCCouponResult.class, true, true); }  BCCouponResult createCoupon(String templateId, String userId); BCCouponResult queryCoupon(String id); BCCouponsResult queryCoupons(BCCouponCriteria couponCriteria); BCCouponTemplateResult queryCouponTemplate(String id); BCCouponTemplatesResult queryCouponTemplates(BCCouponTemplateCriteria templateCriteria);  }
@Test public void testQueryCoupon() { BCCouponResult couponResult = couponService.queryCoupon("79578fba-7330-4f4f-a063-3e97de28783a"); Assert.assertTrue(couponResult.getResultCode() == 0); BCCoupon coupon = couponResult.getCoupon(); System.out.println(coupon.getAppId()); System.out.println(coupon.getTemplate().getName()); }