@Test
public void testUpdate() throws Exception {

	SmsInstruction instruction = new SmsInstruction();
	instruction.setCouponCode("couponCode");
	instruction.setCouponId("23,233,231");
	instruction.setDescription("测试用例");
	instruction.setInstructionCode("test321");
	smsInstructionDAO.save(instruction);
	
	instruction.setDescription("测试用例123");
	instruction.setCouponCode("yyddd");	
	smsInstructionDAO.update(instruction);
	
	Statement stat = conn.createStatement();
	ResultSet rs = stat.executeQuery("SELECT * FROM sms_instruction WHERE instruction_code = 'test321' AND coupon_code = 'yyddd'");
	
	if (rs.next()) {
		Assert.assertEquals(rs.getString("instruction_code"), instruction.getInstructionCode());
		Assert.assertEquals(rs.getString("coupon_code"), instruction.getCouponCode());
		Assert.assertEquals(rs.getString("DESCRIPTION"), instruction.getDescription());
		Assert.assertEquals(rs.getString("coupon_id"), instruction.getCouponId());
		
		Assert.assertTrue(rs.isAfterLast());
	} else {
		fail("未更新任何数据");
	}		
}