ShopLogDAO extends BaseIbatisDAO { @SuppressWarnings("unchecked") public List<ShopLog> query(final Map<String, Object> parametes) { return super.queryForList("SHOP_LOG.query", parametes); }  Long insert(final ShopLog shopLog); @SuppressWarnings("unchecked") List<ShopLog> query(final Map<String, Object> parametes); void savePutPoint(final ShopCustomerPresentPoint scpp);  }
@Test public void testQuery() throws SQLException { Map<String, Object> parametes = new HashMap<String, Object>(); parametes.put("objectId", 32); parametes.put("objectType", "SHOP_PRODUCT"); List<ShopLog> logList = shopLogDAO.query(parametes); String sql = "select count(*) from SHOP_LOG where OBJECT_ID=32 and OBJECT_TYPE='SHOP_PRODUCT'"; Statement stat = conn.createStatement(); ResultSet rs = stat.executeQuery(sql); rs.next(); Assert.assertEquals(logList.size(), rs.getLong(1)); }