* Test method for 'com.google.checkout.sample.protocol.MerchantCalculationResultBuilder.createCouponResult(boolean, float, String, String)'
*/
public void testCreateCouponResult() throws Exception {
MerchantCalculationResultBuilder builder
= MerchantCalculationResultBuilder.getInstance();
CouponResult result1 = builder.createCouponResult(true, 10.00F,
"C10983488", "coupon 10");
String coupon1 = builder.unmarshal(builder.convertToDOM(result1));
assertEquals(couponCodeResultOne, coupon1);
try {
CouponResult invalidCoupon
= builder.createCouponResult(false, -100.00F, "X1093432222",
"coupon -100");
} catch (ProtocolException protoEx) {
assertContains(protoEx.getMessage(), "negative");
}