ShopLogDAO extends BaseIbatisDAO { public void savePutPoint(final ShopCustomerPresentPoint scpp) { super.insert("SHOP_LOG.savePutPoint", scpp); }  Long insert(final ShopLog shopLog); @SuppressWarnings("unchecked") List<ShopLog> query(final Map<String, Object> parametes); void savePutPoint(final ShopCustomerPresentPoint scpp);  }
@Test public void testSavePutPoint() throws SQLException { ShopCustomerPresentPoint scpp = new ShopCustomerPresentPoint(); scpp.setCsName("test"); scpp.setMemo("test memo"); scpp.setOrderId(32L); scpp.setPutPoint(200L); scpp.setPutThing("test"); scpp.setUserId(1L); scpp.setUserName("username"); shopLogDAO.savePutPoint(scpp); String sql = "select * from SHOP_CUSTOMER_PRESENT_POINT where USER_ID = '123' and ORDER_ID = 32"; Statement stat = conn.createStatement(); ResultSet rs = stat.executeQuery(sql); rs.next(); Assert.assertEquals(rs.getString("USER_ID"), scpp.getUserId()); Assert.assertEquals(rs.getString("USER_NAME"), scpp.getUserName()); Assert.assertEquals(rs.getLong("ORDER_ID"), scpp.getOrderId().longValue()); Assert.assertEquals(rs.getString("PUT_THING"), scpp.getPutThing()); Assert.assertEquals(rs.getLong("PUT_POINT"), scpp.getPutPoint().longValue()); Assert.assertEquals(rs.getString("MEMO"), scpp.getMemo()); Assert.assertNotNull(rs.getDate("CREATE_DATE")); Assert.assertEquals(rs.getString("CS_NAME"), scpp.getCsName()); }